mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
build: make release process easier for multi users
Use staging area on nodejs.org instead of TJ's account. Also pushes release tag and branch to personal forks rather than joyent/node, which makes errors have less impact. Pushing release tags and branches is left as a manual step for the release managers, when they decide the timing is best. PR: #25638 PR-URL: https://github.com/joyent/node/pull/25638 Reviewed-By: Sam Roberts <sam@strongloop.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
1 parent
e5aaa34ba0
commit
ec861f6f90
2 files changed
+47
-16
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import os,re
|
||||
import os, re, sys
|
||||
|
||||
node_version_h = os.path.join(os.path.dirname(__file__), '..', 'src',
|
||||
'node_version.h')
|
||||
@@ -13,7 +13,13 @@ for line in f:
|
||||
if re.match('#define NODE_PATCH_VERSION', line):
|
||||
patch = line.split()[2]
|
||||
|
||||
if int(minor) % 2 == 0:
|
||||
major_minor = major + '.' + minor
|
||||
if major_minor == '0.10':
|
||||
print 'maintenance'
|
||||
elif major_minor == '0.12':
|
||||
print 'stable'
|
||||
else:
|
||||
elif minor % 2 != 0:
|
||||
print 'unstable'
|
||||
else:
|
||||
print 'Unknown stability status, exiting'
|
||||
sys.exit(1)
|
||||
@@ -13,18 +13,41 @@ fi
|
||||
stability="$(python tools/getstability.py)"
|
||||
NODE_STABC="$(tr '[:lower:]' '[:upper:]' <<< ${stability:0:1})${stability:1}"
|
||||
NODE_STABL="$stability"
|
||||
GITHUB_USERNAME=
|
||||
|
||||
function usage
|
||||
{
|
||||
echo "usage: sh tools/node-release-post-build.sh -u gh_username"
|
||||
exit 1
|
||||
}
|
||||
|
||||
while [ "$1" != "" ]; do
|
||||
case $1 in
|
||||
-u | --github-username ) shift
|
||||
GITHUB_USERNAME=$1
|
||||
;;
|
||||
* ) usage
|
||||
exit 1
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ "$GITHUB_USERNAME" = "" ];
|
||||
then
|
||||
usage
|
||||
fi
|
||||
|
||||
echo "Building for $stability"
|
||||
|
||||
scp tj@nodejs.org:archive/node/tmp/v$(python tools/getnodeversion.py)/SHASUM* .
|
||||
scp staging@nodejs.org:archive/node/tmp/v$(python tools/getnodeversion.py)/SHASUM* .
|
||||
FILES="SHASUMS SHASUMS256"
|
||||
for i in $FILES ; do gpg -s $i.txt; gpg --clearsign $i.txt; done
|
||||
scp SHASUM* tj@nodejs.org:archive/node/tmp/v$(python tools/getnodeversion.py)/
|
||||
scp SHASUM* staging@nodejs.org:archive/node/tmp/v$(python tools/getnodeversion.py)/
|
||||
|
||||
ssh nodejs.org mkdir -p "dist/v$(python tools/getnodeversion.py)/{x64,docs}"
|
||||
ssh nodejs.org ln -s ../dist/v$(python tools/getnodeversion.py)/docs docs/v$(python tools/getnodeversion.py)
|
||||
|
||||
ssh root@nodejs.org mv /home/tj/archive/node/tmp/v$(python tools/getnodeversion.py)/* /home/node/dist/v$(python tools/getnodeversion.py)/
|
||||
ssh root@nodejs.org mv /home/staging/archive/node/tmp/v$(python tools/getnodeversion.py)/* /home/node/dist/v$(python tools/getnodeversion.py)/
|
||||
ssh root@nodejs.org chown -R node:other /home/node/dist/v$(python tools/getnodeversion.py)
|
||||
|
||||
# tag the release
|
||||
@@ -32,7 +55,7 @@ ssh root@nodejs.org chown -R node:other /home/node/dist/v$(python tools/getnodev
|
||||
git tag -sm "$(bash tools/changelog-head.sh)" v$(python tools/getnodeversion.py)
|
||||
|
||||
# push to github
|
||||
git push git@github.com:joyent/node v$(python tools/getnodeversion.py)-release --tags
|
||||
git push git@github.com:$GITHUB_USERNAME/node v$(python tools/getnodeversion.py)-release --tags
|
||||
|
||||
# blog post and email
|
||||
make email.md
|
||||
@@ -51,16 +74,18 @@ make email.md
|
||||
echo ""
|
||||
cat email.md ) > ../node-website/doc/blog/release/v$(python tools/getnodeversion.py).md
|
||||
|
||||
if [ "$stability" = "stable" ];
|
||||
if [ "$stability" = "unstable" ];
|
||||
then
|
||||
## this needs to happen here because the website depends on the current node
|
||||
## node version
|
||||
## this will get the api docs in the right place
|
||||
make website-upload
|
||||
BRANCH="v$(python tools/getnodeversion.py | sed -E 's#\.[0-9]+$##')"
|
||||
echo $(python tools/getnodeversion.py) > ../node-website/STABLE
|
||||
else
|
||||
BRANCH="master"
|
||||
else
|
||||
## This needs to happen here because the website depends on the current node
|
||||
## node version.
|
||||
if [ "$stability" = "stable" ]
|
||||
then
|
||||
echo $(python tools/getnodeversion.py) > ../node-website/STABLE
|
||||
fi
|
||||
|
||||
BRANCH="v$(python tools/getnodeversion.py | sed -E 's#\.[0-9]+$##')"
|
||||
fi
|
||||
|
||||
echo "Merging back into $BRANCH"
|
||||
@@ -74,6 +99,6 @@ git merge --no-ff v$(python tools/getnodeversion.py)-release
|
||||
vim src/node_version.h
|
||||
git commit -am "Now working on "$(python tools/getnodeversion.py)
|
||||
|
||||
git push git@github.com:joyent/node $BRANCH
|
||||
git push git@github.com:$GITHUB_USERNAME/node $BRANCH
|
||||
|
||||
echo "Now go do the website stuff"
|
||||
Reference in new issue
Block a user