-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: promote the v3 branch when publishing on v3 (#4585)
Sames as #4584 for v3 Technically, we could "just fix" the script. However, I think it's best to make it "fit" with the rest of our release scripts in its code architecture while keeping the same functionality https://coveord.atlassian.net/browse/KIT-3668
- Loading branch information
1 parent
1dbd9a9
commit 7b9144d
Showing
13 changed files
with
54 additions
and
73 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env node | ||
import {describeNpmTag, npmSetTag} from '@coveo/semantic-monorepo-tools'; | ||
import {readFileSync} from 'node:fs'; | ||
import {gt} from 'semver'; | ||
import {NPM_LATEST_TAG} from './common/constants.mjs'; | ||
|
||
if (!process.env.INIT_CWD) { | ||
throw new Error('Should be called using npm run-script'); | ||
} | ||
process.chdir(process.env.INIT_CWD); | ||
|
||
const {name, version} = JSON.parse( | ||
readFileSync('package.json', {encoding: 'utf-8'}) | ||
); | ||
|
||
const publishedVersion = await describeNpmTag(name, NPM_LATEST_TAG); | ||
|
||
if (gt(publishedVersion, version)) { | ||
console.log( | ||
`skipping tag update for ${name} because version "${version}" is not greater than latest version "${publishedVersion}".` | ||
); | ||
process.exit(1); | ||
} | ||
|
||
await npmSetTag(name, version, NPM_LATEST_TAG); |