-
-
Notifications
You must be signed in to change notification settings - Fork 174
Expand file tree
/
Copy pathpromote_release.sh
More file actions
executable file
·47 lines (34 loc) · 1.1 KB
/
promote_release.sh
File metadata and controls
executable file
·47 lines (34 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash
set -e
site=$1
__dirname="$(CDPATH= cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [ "$site" != "iojs" ] && [ "$site" != "nodejs" ]; then
echo "Usage: promote_release.sh < iojs | nodejs > <version>"
exit 1
fi
if [ -z "$2" ]; then
echo "Usage: promote_release.sh < iojs | nodejs > <version>"
exit 1
fi
. ${__dirname}/settings
srcdir=$release_srcdir
dstdir=$release_dstdir
dirmatch=$release_dirmatch
node --no-warnings /home/staging/tools/promote/check_assets.js $srcdir/$2 $dstdir/$2 || exit 1
relative_srcdir=${srcdir/$staging_rootdir/"$site/"}
relative_dstdir=${dstdir/$dist_rootdir/"$site/"}
node --no-warnings /home/staging/tools/promote/check_r2_assets.mjs $staging_bucket/$relative_srcdir/$2 $prod_bucket/$relative_dstdir/$2
while true; do
echo -n "Are you sure you want to promote the $2 assets? [y/n] "
yorn=""
read yorn
if [ "${yorn}" == "n" ]; then
echo "Bailing out ..."
exit 1
fi
if [ "${yorn}" == "y" ]; then
. ${__dirname}/_promote.sh $site $2
nodejs-latest-linker /home/dist/${site}/release/ /home/dist/${site}/docs/
break
fi
done