13
13
stability=" $( python tools/getstability.py) "
14
14
NODE_STABC=" $( tr ' [:lower:]' ' [:upper:]' <<< ${stability: 0: 1} ) ${stability: 1} "
15
15
NODE_STABL=" $stability "
16
+ GITHUB_USERNAME=
17
+
18
+ function usage
19
+ {
20
+ echo " usage: sh tools/node-release-post-build.sh -u gh_username"
21
+ exit 1
22
+ }
23
+
24
+ while [ " $1 " != " " ]; do
25
+ case $1 in
26
+ -u | --github-username ) shift
27
+ GITHUB_USERNAME=$1
28
+ ;;
29
+ * ) usage
30
+ exit 1
31
+ esac
32
+ shift
33
+ done
34
+
35
+ if [ " $GITHUB_USERNAME " = " " ];
36
+ then
37
+ usage
38
+ fi
16
39
17
40
echo " Building for $stability "
18
41
19
- scp tj @nodejs.org:archive/node/tmp/v$( python tools/getnodeversion.py) /SHASUM* .
42
+ scp staging @nodejs.org:archive/node/tmp/v$( python tools/getnodeversion.py) /SHASUM* .
20
43
FILES=" SHASUMS SHASUMS256"
21
44
for i in $FILES ; do gpg -s $i .txt; gpg --clearsign $i .txt; done
22
- scp SHASUM* tj @nodejs.org:archive/node/tmp/v$( python tools/getnodeversion.py) /
45
+ scp SHASUM* staging @nodejs.org:archive/node/tmp/v$( python tools/getnodeversion.py) /
23
46
24
47
ssh nodejs.org mkdir -p " dist/v$( python tools/getnodeversion.py) /{x64,docs}"
25
48
ssh nodejs.org ln -s ../dist/v$( python tools/getnodeversion.py) /docs docs/v$( python tools/getnodeversion.py)
26
49
27
- ssh
[email protected] mv /home/
tj /archive/node/tmp/v
$( python tools/getnodeversion.py) /
* /home/node/dist/v
$( python tools/getnodeversion.py) /
50
+ ssh
[email protected] mv /home/
staging /archive/node/tmp/v
$( python tools/getnodeversion.py) /
* /home/node/dist/v
$( python tools/getnodeversion.py) /
28
51
ssh
[email protected] chown -R node:other /home/node/dist/v
$( python tools/getnodeversion.py)
29
52
30
53
# tag the release
31
54
# should be the same key used to sign the shasums
32
55
git tag -sm " $( bash tools/changelog-head.sh) " v$( python tools/getnodeversion.py)
33
56
34
57
# push to github
35
- git push
[email protected] :
joyent /node v
$( python tools/getnodeversion.py) -release --tags
58
+ git push
[email protected] :
$GITHUB_USERNAME /node v
$( python tools/getnodeversion.py) -release --tags
36
59
37
60
# blog post and email
38
61
make email.md
@@ -51,16 +74,18 @@ make email.md
51
74
echo " "
52
75
cat email.md ) > ../node-website/doc/blog/release/v$( python tools/getnodeversion.py) .md
53
76
54
- if [ " $stability " = " stable " ];
77
+ if [ " $stability " = " unstable " ];
55
78
then
56
- # # this needs to happen here because the website depends on the current node
57
- # # node version
58
- # # this will get the api docs in the right place
59
- make website-upload
60
- BRANCH=" v$( python tools/getnodeversion.py | sed -E ' s#\.[0-9]+$##' ) "
61
- echo $( python tools/getnodeversion.py) > ../node-website/STABLE
62
- else
63
79
BRANCH=" master"
80
+ else
81
+ # # This needs to happen here because the website depends on the current node
82
+ # # node version.
83
+ if [ " $stability " = " stable" ]
84
+ then
85
+ echo $( python tools/getnodeversion.py) > ../node-website/STABLE
86
+ fi
87
+
88
+ BRANCH=" v$( python tools/getnodeversion.py | sed -E ' s#\.[0-9]+$##' ) "
64
89
fi
65
90
66
91
echo " Merging back into $BRANCH "
@@ -74,6 +99,6 @@ git merge --no-ff v$(python tools/getnodeversion.py)-release
74
99
vim src/node_version.h
75
100
git commit -am " Now working on " $( python tools/getnodeversion.py)
76
101
77
- git push
[email protected] :
joyent /node
$BRANCH
102
+ git push
[email protected] :
$GITHUB_USERNAME /node
$BRANCH
78
103
79
104
echo " Now go do the website stuff"
0 commit comments