Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Mar 14, 2017
1 parent 749f098 commit 2b6c992
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
15 changes: 11 additions & 4 deletions bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -ex

VERSION=`./bin/version`
NODE_VERSION=7.4.0
NODE_VERSION=7.5.0

if [ $# -ne 1 ]; then
echo "USAGE: ./bin/build PLATFORM"
Expand All @@ -27,14 +27,14 @@ cp -r lib $WORKSPACE
# install node
NODE_BASE=node-v$NODE_VERSION-$PLATFORM
if [ ! -f tmp/$NODE_BASE.tar.xz ]; then
curl -fSLo tmp/$NODE_BASE.tar.xz https://nodejs.org/dist/v7.4.0/$NODE_BASE.tar.xz
curl -fSLo tmp/$NODE_BASE.tar.xz https://nodejs.org/dist/v$NODE_VERSION/$NODE_BASE.tar.xz
fi
tar -C $WORKSPACE -xf tmp/$NODE_BASE.tar.xz
mv $WORKSPACE/$NODE_BASE $WORKSPACE/node

# install packages
cd $WORKSPACE
yarn install
yarn install --offline --no-progress --production

echo $VERSION > VERSION

Expand All @@ -49,6 +49,13 @@ chmod +x heroku
# create tarball
cd ..
tar cf - $HEROKU_BASE | xz -z > $HEROKU_BASE.tar.xz
tar czf $HEROKU_BASE.tar.gz $HEROKU_BASE

SHA256=`shasum -a 256 $HEROKU_BASE.tar.xz | awk {'print \$1'}`
cat << EOF > $PLATFORM
{
"version": "$VERSION",
"sha256": "$SHA256"
}
EOF

cd ../..
7 changes: 3 additions & 4 deletions bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ CHANNEL=$1

function release {
./bin/build $PLATFORM
aws s3 cp --cache-control max-age=86400 tmp/build/heroku-v$VERSION-$PLATFORM.tar.xz s3://heroku-cli-assets/branches/$CHANNEL/heroku-v$VERSION-$PLATFORM.tar.xz
aws s3 cp --cache-control max-age=86400 tmp/build/heroku-v$VERSION-$PLATFORM.tar.gz s3://heroku-cli-assets/branches/$CHANNEL/heroku-v$VERSION-$PLATFORM.tar.gz
aws s3 cp --cache-control max-age=86400 tmp/build/heroku-v$VERSION-$PLATFORM.tar.xz s3://heroku-cli-assets/branches/$CHANNEL/heroku-$PLATFORM.tar.xz
aws s3 cp --cache-control max-age=86400 tmp/build/heroku-v$VERSION-$PLATFORM.tar.gz s3://heroku-cli-assets/branches/$CHANNEL/heroku-$PLATFORM.tar.gz
aws s3 cp --quiet --cache-control max-age=86400 tmp/build/heroku-v$VERSION-$PLATFORM.tar.xz s3://heroku-cli-assets/branches/$CHANNEL/heroku-v$VERSION-$PLATFORM.tar.xz
aws s3 cp --quiet --cache-control max-age=300 tmp/build/heroku-v$VERSION-$PLATFORM.tar.xz s3://heroku-cli-assets/branches/$CHANNEL/heroku-$PLATFORM.tar.xz
aws s3 cp --quiet --cache-control max-age=300 --content-type application/json tmp/build/$PLATFORM s3://heroku-cli-assets/branches/$CHANNEL/$PLATFORM
}

pids=""
Expand Down

0 comments on commit 2b6c992

Please sign in to comment.