Skip to content

Commit

Permalink
fix(build): make scripts work on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
vsavkin committed Jan 15, 2019
1 parent 8f3226d commit 898693e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/nx-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ childProcess.execSync('cp -R build/packages/* build/npm', {
/**
* Get rid of tarballs at top of copied directory (made with npm pack)
*/
childProcess.execSync(`find build/npm -name "*.tgz" -maxdepth 1 -delete`, {
childProcess.execSync(`find build/npm -maxdepth 1 -name "*.tgz" -delete`, {
stdio: [0, 1, 2]
});

Expand Down
10 changes: 8 additions & 2 deletions scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@ NX_VERSION=$2
./scripts/build.sh

cd build/packages
sed -i "" "s|exports.nxVersion = '\*';|exports.nxVersion = '$NX_VERSION';|g" schematics/src/lib-versions.js
sed -i "" "s|exports.schematicsVersion = '\*';|exports.schematicsVersion = '$SCHEMATICS_VERSION';|g" schematics/src/lib-versions.js

if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i "" "s|exports.nxVersion = '\*';|exports.nxVersion = '$NX_VERSION';|g" schematics/src/lib-versions.js
sed -i "" "s|exports.schematicsVersion = '\*';|exports.schematicsVersion = '$SCHEMATICS_VERSION';|g" schematics/src/lib-versions.js
else
sed -i "s|exports.nxVersion = '\*';|exports.nxVersion = '$NX_VERSION';|g" schematics/src/lib-versions.js
sed -i "s|exports.schematicsVersion = '\*';|exports.schematicsVersion = '$SCHEMATICS_VERSION';|g" schematics/src/lib-versions.js
fi


tar -czf nx.tgz nx
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ NPM_DEST=build/npm
ORIG_DIRECTORY=`pwd`

# Get rid of tarballs at top of copied directory (made with npm pack)
find $NPM_DEST -name *.tgz -maxdepth 1 -delete
find $NPM_DEST -maxdepth 1 -name *.tgz -delete

# We are running inside of a child_process, so we need to reauth
npm adduser
Expand Down

0 comments on commit 898693e

Please sign in to comment.