mirror of
https://github.com/jquery/jquery.git
synced 2026-01-10 13:38:08 -05:00
Changes:
* Run `pre-release.sh` & `post-release.sh` scripts directly; make them
executable
* Fix the hashbang to specify the default bash installation; note: `/bin/bash`
would be a wrong choice as that would use an ancient 3.x version on macOS
* Make sure Bash 5 or newer is used
* Run `npm publish --tag beta` when a pre-release is being published
* Fix the `repository.url` field in `package.json` as reported by `npm publish`
* Fix a few issues reported by shellcheck
Closes gh-5697
(cherry picked from commit a5b0c4318d)
49 lines
1.6 KiB
JavaScript
49 lines
1.6 KiB
JavaScript
"use strict";
|
|
|
|
const blogURL = process.env.BLOG_URL;
|
|
|
|
if ( !blogURL || !blogURL.startsWith( "https://blog.jquery.com/" ) ) {
|
|
throw new Error( "A valid BLOG_URL must be set in the environment" );
|
|
}
|
|
|
|
// This is needed because until the release-it migration,
|
|
// all the previous release tags were disconnected from the 3.x branch.
|
|
// We can remove this if/when we do a 3.x release with the new setup.
|
|
const from = process.env.FROM_VERSION;
|
|
|
|
module.exports = {
|
|
preReleaseBase: 1,
|
|
hooks: {
|
|
"before:init": "./build/release/pre-release.sh",
|
|
"after:version:bump":
|
|
"sed -i '' -e 's|main/AUTHORS.txt|${version}/AUTHORS.txt|' package.json",
|
|
"after:bump": "cross-env VERSION=${version} npm run build:all",
|
|
"before:git:release": "git add -f dist/ dist-module/ changelog.md",
|
|
"after:release": "echo 'Run the following to complete the release:' && " +
|
|
`echo './build/release/post-release.sh $\{version} ${ blogURL }'`
|
|
},
|
|
git: {
|
|
|
|
// Use the node script directly to avoid an npm script
|
|
// command log entry in the GH release notes
|
|
changelog: `node build/release/changelog.js ${ from ? from : "${from}" } $\{to}`,
|
|
commitMessage: "Release: ${version}",
|
|
getLatestTagFromAllRefs: true,
|
|
pushRepo: "git@github.com:jquery/jquery.git",
|
|
requireBranch: "main",
|
|
requireCleanWorkingDir: true
|
|
},
|
|
github: {
|
|
pushRepo: "git@github.com:jquery/jquery.git",
|
|
release: true,
|
|
tokenRef: "JQUERY_GITHUB_TOKEN"
|
|
},
|
|
npm: {
|
|
|
|
// We're publishing from a dist folder generated in the post-release
|
|
// step, so we also need to publish by ourselves; release-it would
|
|
// do it too early.
|
|
publish: false
|
|
}
|
|
};
|