mirror of
https://github.com/zhigang1992/yarn.git
synced 2026-01-12 22:53:44 +08:00
* 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
27 lines
800 B
Bash
Executable File
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
|