github.com/nikron/prototool@v1.3.0/RELEASE.md (about) 1 Release Process 2 =============== 3 4 This document outlines how to create a release of prototool. 5 6 1. Set up some environment variables for use later. 7 8 ``` 9 # This is the version being released. 10 VERSION=1.21.0 11 12 # This is the branch from which $VERSION will be released. 13 # This is almost always dev. 14 BRANCH=dev 15 ``` 16 17 ** If you are copying/pasting commands, make sure you actually set the right value for VERSION above. ** 18 19 2. Make sure you have the latest master. 20 21 ``` 22 git checkout master 23 git pull 24 ``` 25 26 3. Merge the branch being released into master. 27 28 ``` 29 git merge $BRANCH 30 ``` 31 32 4. Alter the Unreleased entry in CHANGELOG.md to point to `$VERSION` and 33 update the link at the bottom of the file. Use the format `YYYY-MM-DD` for 34 the year. 35 36 ```diff 37 -## [Unreleased] 38 +## [1.21.0] - 2017-10-23 39 ``` 40 41 ```diff 42 -[Unreleased]: https://github.com/uber/prototool/compare/v1.20.1...HEAD 43 +[1.21.0]: https://github.com/uber/prototool/compare/v1.20.1...v1.21.0 44 ``` 45 46 47 5. Update the version number in internal/vars/vars.go and the Installation 48 section of the README.md and verify that it matches what is in the changelog. 49 50 ```diff 51 -const Version = "1.21.0-dev" 52 +const Version = "1.21.0" 53 ``` 54 55 6. Create a commit for the release. 56 57 ``` 58 git add internal/vars/vars.go README.md CHANGELOG.md 59 git commit -m "Preparing release v$VERSION" 60 ``` 61 62 7. Tag and push the release. 63 64 ``` 65 git tag -a "v$VERSION" -m "v$VERSION" 66 git push origin master "v$VERSION" 67 ``` 68 69 8. Go to <https://travis-ci.org/uber/prototool/builds> and cancel the 70 build for `v$VERSION`. If that Codecov build completes before the Codecov 71 build for master, the code coverage for master will not get updated because 72 only one branch gets updated per commit; this was verified with Codecov 73 support. This will get tested by the build for master anyways. 74 75 9. Build the release artifacts. This will put files in the release package 76 that will be uploaded in the next step. 77 78 ``` 79 make releasegen 80 ls release 81 ``` 82 83 10. Go to <https://github.com/uber/prototool/tags> and edit the release notes 84 of the new tag. Copy the changelog entries for this release in the 85 release notes and set the name of the release to the version number 86 (`v$VERSION`). Upload the release artifacts from the release directory. 87 88 11. Switch back to development. 89 90 ``` 91 git checkout $BRANCH 92 git merge master 93 ``` 94 95 12. Add a placeholder for the next version to CHANGELOG.md and a new link at 96 the bottom. 97 98 ```diff 99 +## [Unreleased] 100 +- No changes yet. 101 + 102 ## [1.21.0] - 2017-10-23 103 ``` 104 105 ```diff 106 +[Unreleased]: https://github.com/uber/prototool/compare/v1.21.0...HEAD 107 [1.21.0]: https://github.com/uber/prototool/compare/v1.20.1...v1.21.0 108 ``` 109 110 13. Update the version number in internal/vars/vars.go to a new minor version 111 suffixed with `"-dev"`. 112 113 ```diff 114 -const Version = "1.21.0" 115 +const Version = "1.22.0-dev" 116 ``` 117 118 14. Commit and push your changes. 119 120 ``` 121 git add CHANGELOG.md internal/vars/vars.go 122 git commit -m 'Back to development' 123 git push origin $BRANCH 124 ``` 125 126 15. Update the formula in https://github.com/homebrew/homebrew-core. First, download 127 the newly created source tarball and compute the SHA-256 hash. 128 129 ``` 130 # Use "sha256sum" instead of "shasum -a 256" on Linux. 131 # Do not forget the -sSL or you will get the wrong hash. 132 curl -sSL https://github.com/uber/prototool/archive/v1.22.0.tar.gz | shasum -a 256 | cut -f 1 -d ' ' 133 ``` 134 135 Then, fork github.com/homebrew/homebrew-core if you have not already, and create 136 a new branch named "prototool-$VERSION". Update `Formula/prototool.rb` to use 137 the new version and SHA-256 hash. 138 139 ``` 140 url "https://github.com/uber/prototool/archive/v1.22.0.tar.gz" 141 sha256 "NEW_SHA_256_HASH_FROM_ABOVE" 142 ``` 143 144 Create a commit with the message "prototool $VERSION" and open a PR with the same name.