-
-
Notifications
You must be signed in to change notification settings - Fork 232
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
1 parent
19967e7
commit 4242b02
Showing
12 changed files
with
384 additions
and
242 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
package-lock=false | ||
package-lock=false | ||
|
||
# For npm v7 and later, an authToken needs to be present in the publish request (even though we don't use it | ||
# for the publishing to verdaccio) | ||
# Source: https://twitter.com/verdaccio_npm/status/1357798427283910660 | ||
//localhost:4872/:_authToken=fake |
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 @@ | ||
tet:YCNzj8gKzXBWg:autocreated 2023-11-14T11:36:24.640Z |
This file was deleted.
Oops, something went wrong.
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,65 @@ | ||
import execa from 'execa'; | ||
import semver from 'semver'; | ||
|
||
const preid = 'alpha'; | ||
const distTag = 'canary'; | ||
|
||
(async function main() { | ||
const currentLatestVersion = execa | ||
.sync('npm', ['view', '@angular-eslint/eslint-plugin@latest', 'version']) | ||
.stdout?.trim(); | ||
|
||
const currentCanaryVersion = execa | ||
.sync('npm', [ | ||
'view', | ||
`@angular-eslint/eslint-plugin@${distTag}`, | ||
'version', | ||
]) | ||
.stdout?.trim(); | ||
|
||
console.log('\nResolved current versions: ', { | ||
currentLatestVersion, | ||
currentCanaryVersion, | ||
}); | ||
|
||
let nextCanaryVersion: string | null; | ||
|
||
if (semver.gte(currentLatestVersion, currentCanaryVersion)) { | ||
console.log( | ||
'\nLatest version is greater than or equal to the current canary version, starting new prerelease base...', | ||
); | ||
// Determine next minor version above the currentLatestVersion | ||
nextCanaryVersion = semver.inc( | ||
currentLatestVersion, | ||
'prerelease', | ||
undefined, | ||
preid, | ||
); | ||
} else { | ||
console.log( | ||
'\nLatest version is less than the current canary version, incrementing the existing prerelease base...', | ||
); | ||
// Determine next prerelease version above the currentCanaryVersion | ||
nextCanaryVersion = semver.inc( | ||
currentCanaryVersion, | ||
'prerelease', | ||
undefined, | ||
preid, | ||
); | ||
} | ||
|
||
if (!nextCanaryVersion) { | ||
console.log(`Error: Unable to determine next canary version`); | ||
process.exit(1); | ||
} | ||
|
||
console.log(`\nApplying next canary version with Nx`); | ||
|
||
const command = `nx release version ${nextCanaryVersion}`; | ||
|
||
console.log(`\n> ${command}\n`); | ||
|
||
execa.sync('yarn', command.split(' '), { | ||
stdio: 'inherit', | ||
}); | ||
})(); |
Oops, something went wrong.