Skip to content

Commit

Permalink
resolving outdated script
Browse files Browse the repository at this point in the history
  • Loading branch information
crysmags committed Oct 8, 2024
1 parent 07b2634 commit fe05b28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 0 additions & 4 deletions scripts/create_matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ const versionsPath = path.join(

const matricesJson = require(matricesPath)

const pluginsNames = Object.getOwnPropertyNames(yaml.load(fs.readFileSync(matricesPath, 'utf-8')).matrices)

// console.log('json', pluginsNames)

const versionsJson = require(versionsPath)
const versionsNames = Object.getOwnPropertyNames(yaml.load(fs.readFileSync(versionsPath, 'utf-8')).matrices)

Expand Down
10 changes: 5 additions & 5 deletions scripts/outdated.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const fs = require('fs')
const { execSync } = require('child_process')
const yaml = require('js-yaml')

Check failure on line 8 in scripts/outdated.js

View workflow job for this annotation

GitHub Actions / lint

'js-yaml' should be listed in the project's dependencies. Run 'npm i -S js-yaml' to add it

const { generateMatrix } = require('./create_matrix')
// const { generateMatrix } = require('./create_matrix')

const latestsPath = path.join(
__dirname,
Expand Down Expand Up @@ -97,17 +97,17 @@ async function updatePlugin (name) {
async function fix () {
for (const name of pluginNames) {
await updatePlugin(name)
generateMatrix(name)
// generateMatrix(name)
}

const result = execSync('git status').toString()

if (result.includes(matricesPath)) {
if (result.includes(versionsPath)) {
const branchName = 'update_outdated_integrations'
try {
execSync(`git checkout -b ${branchName}`)
execSync(`git add ${matricesPath}`)
execSync('git commit -m "fix: update integr latests.json"')
execSync(`git add ${versionsPath}`)
execSync('git commit -m "fix: update integr versions.json"')
execSync(`git push origin ${branchName}`)

makeAPR(branchName)
Expand Down

0 comments on commit fe05b28

Please sign in to comment.