Skip to content

Commit

Permalink
Build tarball and standalone JS files into artifacts directory (yarnp…
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel15 committed Oct 20, 2016
1 parent 59d02bd commit b17082d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
4 changes: 0 additions & 4 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,5 @@ deployment:
owner: yarnpkg
commands:
- ./ghr --username yarnpkg --repository yarn --token $KPM_CIRCLE_RELEASE_TOKEN v$(dist/bin/yarn --version) artifacts/
# TODO(#548): All artifacts should come from artifacts/ directory
- ./ghr --username yarnpkg --repository yarn --token $KPM_CIRCLE_RELEASE_TOKEN v$(dist/bin/yarn --version) dist/yarn-v*.tar.gz
- ./ghr --username yarnpkg --repository yarn --token $KPM_CIRCLE_RELEASE_TOKEN v$(dist/bin/yarn --version) dist/yarn-$(dist/bin/yarn --version).js
- ./ghr --username yarnpkg --repository yarn --token $KPM_CIRCLE_RELEASE_TOKEN v$(dist/bin/yarn --version) dist/yarn-legacy-$(dist/bin/yarn --version).js
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
- npm publish
6 changes: 3 additions & 3 deletions scripts/build-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ ensureAvailable rpmbuild

PACKAGE_TMPDIR=tmp/debian_pkg
VERSION=`dist/bin/yarn --version`
TARBALL_NAME=dist/yarn-v$VERSION.tar.gz
DEB_PACKAGE_NAME=yarn_$VERSION'_all.deb'
OUTPUT_DIR=artifacts
TARBALL_NAME=$OUTPUT_DIR/yarn-v$VERSION.tar.gz
DEB_PACKAGE_NAME=yarn_$VERSION'_all.deb'

if [ ! -e $TARBALL_NAME ]; then
echo "Hey! Listen! You need to run build-dist.sh first."
Expand All @@ -25,7 +25,7 @@ fi;

mkdir -p $OUTPUT_DIR
# Remove old packages
rm -f dist/*.deb $OUTPUT_DIR/*.deb $OUTPUT_DIR/*.rpm
rm -f $OUTPUT_DIR/*.deb $OUTPUT_DIR/*.rpm

# Extract to a temporary directory
rm -rf $PACKAGE_TMPDIR
Expand Down
5 changes: 3 additions & 2 deletions scripts/build-dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ npm run build
npm pack
rm -rf dist
mkdir dist
mkdir -p artifacts
mv yarn-*.tgz dist/pack.tgz

cd dist
Expand All @@ -17,5 +18,5 @@ npm install --production
rm -rf node_modules/*/test node_modules/*/dist
cd ..

tar -cvzf dist/yarn-v`dist/bin/yarn --version`.tar.gz dist/*
shasum -a 256 dist/yarn-*.tar.gz
tar -cvzf artifacts/yarn-v`dist/bin/yarn --version`.tar.gz dist/*
shasum -a 256 artifacts/yarn-*.tar.gz
4 changes: 2 additions & 2 deletions scripts/build-webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const compiler = webpack({
],
output: {
filename: `yarn-${version}.js`,
path: path.join(basedir, 'dist'),
path: path.join(basedir, 'artifacts'),
},
target: 'node',
});
Expand Down Expand Up @@ -72,7 +72,7 @@ const compilerLegacy = webpack({
],
output: {
filename: `yarn-legacy-${version}.js`,
path: path.join(basedir, 'dist'),
path: path.join(basedir, 'artifacts'),
},
target: 'node',
});
Expand Down

0 comments on commit b17082d

Please sign in to comment.