mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
53ad94f319
- the date is actually the date of the commit *prior* to the tag commit, as the files are built and then committed. - also, the CDN should still be checked for non-stable releases, and should use different filenames (including in the map files). - certain files should be skipped when checking the CDN. - removed file diffing because it ended up being far too noisy, making it difficult to find the info I needed. - because the build script required an addition, release verification will not work until the next release. - print all files in failure case and whether each matched - avoid npm script log in GH release notes changelog - exclude changelog.md from release:clean command - separate the post-release script from release-it for now, so we can keep manual verification before each push. The exact command is printed at the ened for convenience. Closes gh-5521
61 lines
1.4 KiB
Bash
61 lines
1.4 KiB
Bash
#!/bin/sh
|
|
|
|
set -euo pipefail
|
|
|
|
# $1: Version
|
|
# $2: Blog URL
|
|
|
|
cdn=tmp/release/cdn
|
|
dist=tmp/release/dist
|
|
|
|
if [[ -z "$1" ]] then
|
|
echo "Version is not set (1st argument)"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ -z "$2" ]] then
|
|
echo "Blog URL is not set (2nd argument)"
|
|
exit 1
|
|
fi
|
|
|
|
# Push files to cdn repo
|
|
npm run release:cdn $1
|
|
cd $cdn
|
|
git add -A
|
|
git commit -m "jquery: Add version $1"
|
|
|
|
# Wait for confirmation from user to push changes to cdn repo
|
|
read -p "Press enter to push changes to cdn repo"
|
|
git push
|
|
cd -
|
|
|
|
# Push files to dist repo
|
|
npm run release:dist $1 $2
|
|
cd $dist
|
|
git add -A
|
|
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"
|
|
git push --follow-tags
|
|
cd -
|
|
|
|
# Restore AUTHORS URL
|
|
sed -i "s/$1\/AUTHORS.txt/main\/AUTHORS.txt/" package.json
|
|
git add package.json
|
|
|
|
# Remove built files from tracking.
|
|
# Leave the changelog.md committed.
|
|
# Leave the tmp folder as some files are needed
|
|
# after the release (such as for emailing archives).
|
|
npm run build:clean
|
|
git rm --cached -r dist/ dist-module/
|
|
git add dist/package.json dist/wrappers dist-module/package.json dist-module/wrappers
|
|
git commit -m "Release: remove dist files from main branch"
|
|
|
|
# Wait for confirmation from user to push changes
|
|
read -p "Press enter to push changes to main branch"
|
|
git push
|