Files
yarn/scripts/build-dist-debug.sh
Daniel Lo Nigro cbcdede995 Publish tarball with single JS file build to npm (#3866)
* Remove unneeded package.json fields from dist

We don't need dependencies and devDependencies in the package.json within the Yarn distributable, as the dependencies are bundled with Yarn itself. We also don't need "scripts" or "jest" as they're purely for development

* Add script for publishing to npm

* Add Jenkins job for publishing to npm
2017-07-09 12:12:30 +01:00

27 lines
800 B
Bash
Executable File

#!/bin/sh
set -ex
# This is similar to build-dist.sh, except it includes the original .js files
# rather than bundling them into a single .js file. This distribution can
# potentially be useful for debugging purposes, but it's more bloated than the
# regular distribution.
yarn build
yarn pack
rm -rf dist-debug
mkdir dist-debug
mkdir -p artifacts
mv yarn-*.tgz dist-debug/pack.tgz
cd dist-debug
umask 0022 # Ensure permissions are correct (0755 for dirs, 0644 for files)
tar -xzf pack.tgz --strip 1
rm -rf pack.tgz
# Change this to "yarn install --production" once #1115 is fixed
yarn install --production
../scripts/update-dist-manifest.js $(readlink -f package.json) tar
cd ..
tar -cvzf artifacts/yarn-v`dist-debug/bin/yarn --version`.tar.gz dist-debug/*
shasum -a 256 artifacts/yarn-*.tar.gz