Skip to content

Commit

Permalink
fix(release-automation): checkout a temporary branch for release to n…
Browse files Browse the repository at this point in the history
…ot polute the main branch
  • Loading branch information
patrickarlt committed Dec 22, 2017
1 parent 3b42fe9 commit 75a9dec
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 6 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.0.1] - December 21st 2017

### Other Changes

* Bug Fixes
* **release-automation**: fix issues found in https://github.com/Esri/arcgis-rest-js/pull/80. [`3b42fe9`](https://github.com/Esri/arcgis-rest-js/commit/3b42fe9969cc2f6a21428692c72ada8ffffb59a6)
* **release-automation**: fix issues uncovered by 1st release [`a73b76f`](https://github.com/Esri/arcgis-rest-js/commit/a73b76f58843d538d8b29b1ae60a72a9f57ac5ec)

## [1.0.0] - December 21st 2017

Initial Public Release

[1.0.0]: https://github.com/Esri/arcgis-rest-js/compare/265d6aed1856d3ae1ff81f03ce85aba449b01f21...v1.0.0 "v1.0.0"
[1.0.1]: https://github.com/Esri/arcgis-rest-js/compare/v1.0.0...1.0.1 "1.0.1"
[HEAD]: https://github.com/Esri/arcgis-rest-js/compare/1.0.1...HEAD "Unreleased Changes"
32 changes: 26 additions & 6 deletions support/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,32 @@ VERSION=$(node --eval "console.log(require('./lerna.json').version);")

# commit the changes from `npm run release:prepare`
git add --all
git commit -am "Prepare v$VERSION" --no-verify
git commit -am "v$VERSION" --no-verify

# incriment the package.json version to the lerna version so gh-release works
npm version $VERSION --allow-same-version
# sync the package.json version to the lerna version so gh-release works
npm version $VERSION --allow-same-version --no-git-tag-version

# amend the changes from `npm version` to the release commit
git add --all
git commit -am "Prepare v$VERSION" --no-verify --amend
git add package.json
git commit -m"v$VERSION" --no-verify --amend

# push the changes and tag to github
# push everything up to this point to master
git push https://github.com/Esri/arcgis-rest-js.git master

# checkout temp branch for release
git checkout -b release-v$VERSION

# add built files to the release commit
git add packages/*/dist -f

# commit the built files
git commit -am"Publish v$VERSION" --no-verify

# tag the release
git tag v$VERSION

# push the release commit and tag to github
git push https://github.com/Esri/arcgis-rest-js.git release-v$VERSION
git push --tags

# publish each package on npm
Expand All @@ -33,3 +48,8 @@ gh-release --t v$VERSION --repo arcgis-rest-js --owner Esri -a $TEMP_FOLDER.zip

# Delete the ZIP archive
rm $TEMP_FOLDER.zip

# checkout master and delete release branch locally and on GitHub
git checkout master
git branch -D release-v$VERSION
git push upstream :release-v$VERSION

0 comments on commit 75a9dec

Please sign in to comment.