]> source.dussan.org Git - jquery.git/commitdiff
Release: fix running pre/post release scripts in windows
authorTimmy Willison <timmywil@users.noreply.github.com>
Thu, 11 Jul 2024 16:23:10 +0000 (12:23 -0400)
committerGitHub <noreply@github.com>
Thu, 11 Jul 2024 16:23:10 +0000 (12:23 -0400)
- also fix tagging the release in the dist repo

Closes gh-5517

.release-it.cjs
build/release/post-release.sh
build/release/pre-release.sh
package.json

index 5d9d9c22ee1754798963045143813ee879b3f2c1..add1dc66a26c20ff1ff6adcf52498e3b8f8ff667 100644 (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}",
index f5dd1a165fdef7e35a3e64dc77db7bfc74370b7e..03bdbde1eedb3401ddea3a4db3eb731bfac8e38e 100644 (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"
index a7b4f18d70168114bbc8e536c039c38042b90527..f469b0da05e2b5d51e230dfcd38b083d9343fea0 100644 (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
index 903682952dc9397be38379f8ba90c6cffc353330..dccb7119d8e9b3225be3658b57a3d2dd122c66f7 100644 (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",