-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(release-automation): fix issues uncovered by 1st release
Remove NPM prepare scripts, which run before npm publish but break because we are setup w/ lerna. Add publishConfig so lerna publishes the scoped packages as public, otherwise scoped packages are private by default and will fail to publish. lerna bootstrap and npm test will now be run before npm run release:prepare to build and test all the libraries. Some small tweaks were made to the publish script to pick up the package.json versioning and the remove the ZIP archive after it is published.
- Loading branch information
1 parent
4eca6da
commit a73b76f
Showing
8 changed files
with
30 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,31 @@ | ||
#!/bin/bash | ||
|
||
# Extract the version from lerna.json (this was updated by `npm run release:prepare`) | ||
VERSION=$(node --eval "console.log(require('./lerna.json').version);") | ||
TEMP_FOLDER=arcgis-rest-js-v$VERSION; | ||
|
||
# commit the changes from npm run release:prepare | ||
# incriment the package.json version to the lerna version so gh-release works | ||
npm version $VERSION --allow-same-version | ||
|
||
# commit the changes from `npm run release:prepare` and our new package.json version | ||
git add --all | ||
git commit -am "Prepare v$VERSION" --no-verify | ||
|
||
# incriment the package.json version to the lerna version so gh-release works | ||
npm version $VERSION | ||
|
||
# push the changes and tag to github | ||
git push https://github.com/Esri/arcgis-rest-js.git master | ||
git push --tags | ||
|
||
# publish each package on npm | ||
lerna exec -- npm publish | ||
lerna publish --skip-git --yes --repo-version $VERSION | ||
|
||
# create a ZIP archive of the dist files | ||
TEMP_FOLDER=arcgis-rest-js-v$VERSION; | ||
mkdir $TEMP_FOLDER | ||
cp packages/*/dist/umd/* $TEMP_FOLDER | ||
zip -r $TEMP_FOLDER.zip $TEMP_FOLDER | ||
rm -rf $TEMP_FOLDER | ||
|
||
# Run gh-release to create a new release with our changelog changes and ZIP archive | ||
gh-release --t v$VERSION --repo arcgis-rest-js --owner Esri -a $TEMP_FOLDER.zip | ||
|
||
# Delete the ZIP archive | ||
rm $TEMP_FOLDER.zip |