Skip to content
Newer
Older
100755 49 lines (37 sloc) 946 Bytes
b68e8ef @ddollar first pass at vendoring on s3
ddollar authored Sep 16, 2011
1 #!/bin/sh
2
3 set -e
4
5 node_version="$1"
6
7 if [ "$node_version" == "" ]; then
8 echo "usage: $0 VERSION"
9 exit 1
10 fi
11
c959174 @ddollar clean up aws config env vars
ddollar authored Oct 12, 2011
12 if [ "$AWS_ID" == "" ]; then
13 echo "must set AWS_ID"
b68e8ef @ddollar first pass at vendoring on s3
ddollar authored Sep 16, 2011
14 exit 1
15 fi
16
c959174 @ddollar clean up aws config env vars
ddollar authored Oct 13, 2011
17 if [ "$AWS_SECRET" == "" ]; then
18 echo "must set AWS_SECRET"
19 exit 1
20 fi
21
22 if [ "$S3_BUCKET" == "" ]; then
23 echo "must set S3_BUCKET"
b68e8ef @ddollar first pass at vendoring on s3
ddollar authored Sep 16, 2011
24 exit 1
25 fi
26
27 basedir="$( cd -P "$( dirname "$0" )" && pwd )"
28
29 # make a temp directory
30 tempdir="$( mktemp -t node_XXXX )"
31 rm -rf $tempdir
32 mkdir -p $tempdir
04ba7d0 @ddollar use cd instead of pushd
ddollar authored Jan 20, 2012
33 cd $tempdir
b68e8ef @ddollar first pass at vendoring on s3
ddollar authored Sep 16, 2011
34
c54cc27 @ddollar pushd (thanks @asenchi)
ddollar authored Sep 16, 2011
35 # build and package nodejs for heroku
cc93b19 @ddollar give the download url to vulcan directly
ddollar authored Jun 25, 2012
36 vulcan build -v \
37 -n node \
38 -c "cd node-v${node_version} && ./configure --prefix=/app/vendor/node && make install" \
39 -p /app/vendor/node \
40 -s http://nodejs.org/dist/v${node_version}/node-v${node_version}.tar.gz \
41 -o $tempdir/node-${node_version}.tgz
b68e8ef @ddollar first pass at vendoring on s3
ddollar authored Sep 16, 2011
42
c54cc27 @ddollar pushd (thanks @asenchi)
ddollar authored Sep 16, 2011
43 # upload nodejs to s3
c959174 @ddollar clean up aws config env vars
ddollar authored Oct 13, 2011
44 $basedir/aws/s3 put $S3_BUCKET \
c54cc27 @ddollar pushd (thanks @asenchi)
ddollar authored Sep 16, 2011
45 nodejs-${node_version}.tgz $tempdir/node-${node_version}.tgz
b68e8ef @ddollar first pass at vendoring on s3
ddollar authored Sep 16, 2011
46
1a9a553 @ddollar build package manifests
ddollar authored Nov 30, 2011
47 # generate manifest
48 $basedir/manifest nodejs
Something went wrong with that request. Please try again.