-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
63 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
const fs = require('fs'); | ||
// const semver = require('semver'); | ||
|
||
module.exports = async () => { | ||
const corePackagePath = 'lib/core/package.json'; | ||
const coreSchematicsPath = 'lib/core/schematics/migrations/collection.json'; | ||
const coreNxMigrationPath = 'lib/core/nx-migrations.json'; | ||
|
||
const rawCorePackage = fs.readFileSync(corePackagePath, 'utf8'); | ||
const corePackage = JSON.parse(rawCorePackage); | ||
|
||
const rawCoreSchematics = fs.readFileSync(coreSchematicsPath, 'utf8'); | ||
const coreSchematics = JSON.parse(rawCoreSchematics); | ||
|
||
const rawCoreNxMigration = fs.readFileSync(coreNxMigrationPath, 'utf8'); | ||
const coreNxMigration = JSON.parse(rawCoreNxMigration); | ||
|
||
const coreVersion = corePackage.version; | ||
console.log({ coreVersion }, { coreNxMigration }, { coreSchematics }); | ||
|
||
const coreMigrations = [ | ||
{ | ||
name: 'move-out-alfresco-api', | ||
version: '<=7.0.0' | ||
} | ||
]; | ||
|
||
coreMigrations.forEach((migration) => { | ||
coreNxMigration['generators'][migration.name]?.['version'] === coreVersion; | ||
coreSchematics['schematics'][migration.name]?.['version'] === coreVersion; | ||
}); | ||
|
||
fs.writeFileSync(coreNxMigrationPath, JSON.stringify(coreNxMigration)); | ||
fs.writeFileSync(coreSchematicsPath, JSON.stringify(coreSchematics)); | ||
}; |