Release: fix running pre/post release scripts in windows

- also fix tagging the release in the dist repo

Closes gh-5517
This commit is contained in:
Timmy Willison 2024-07-11 12:23:10 -04:00 committed by GitHub
parent 862e7a1882
commit 5518b2da18
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 7 deletions

View File

@ -8,11 +8,12 @@ if ( !blogURL || !blogURL.startsWith( "https://blog.jquery.com/" ) ) {
module.exports = {
hooks: {
"before:init": "./build/release/pre-release.sh",
"before:init": "bash ./build/release/pre-release.sh",
"before:git:release": "git add -f dist/ dist-module/ changelog.md",
"after:version:bump":
"sed -i 's/main/AUTHORS.txt/${version}/AUTHORS.txt/' package.json",
"after:release": `./build/release/post-release.sh \${version} ${ blogURL }`
"sed -i 's/main\\/AUTHORS.txt/${version}\\/AUTHORS.txt/' package.json",
"after:release":
`bash ./build/release/post-release.sh \${version} ${ blogURL }`
},
git: {
changelog: "npm run release:changelog -- ${from} ${to}",

View File

@ -33,7 +33,9 @@ cd -
npm run release:dist $1 $2
cd $dist
git add -A
npm version $1
git commit -m "Release: $1"
# -s to sign and annotate tag (recommended for releases)
git tag -s $1 -m "Release: $1"
# Wait for confirmation from user to push changes to dist repo
read -p "Press enter to push changes to dist repo"

View File

@ -2,11 +2,17 @@
set -euo pipefail
# Cleans all release and build artifacts
# Install dependencies
npm ci
# Clean all release and build artifacts
npm run build:clean
npm run release:clean
npm ci
# Check authors
npm run authors:check
# Run tests
npm test
# Clone dist and cdn repos to the tmp/release directory

View File

@ -50,7 +50,7 @@
"babel:tests": "babel test/data/core/jquery-iterability-transpiled-es6.js --out-file test/data/core/jquery-iterability-transpiled.js",
"build": "node ./build/command.js",
"build:all": "node -e \"(async () => { const { buildDefaultFiles } = await import('./build/tasks/build.js'); buildDefaultFiles() })()\"",
"build:clean": "rimraf dist/*.{js,map} dist-module/*.{js,map}",
"build:clean": "rimraf --glob dist/*.{js,map} --glob dist-module/*.{js,map}",
"build:main": "node -e \"(async () => { const { build } = await import('./build/tasks/build.js'); build() })()\"",
"lint:dev": "eslint --cache .",
"lint:json": "jsonlint --quiet package.json",