go.uber.org/yarpc@v1.72.1/RELEASE.md (about)

     1  Release process
     2  ===============
     3  
     4  > **NOTE**: Don't do any of this before validating with a test service. Check
     5  > the internal release doc (ask someone about it) for more information.
     6  
     7  This document outlines how to create a release of yarpc-go.
     8  
     9  Prerequisites
    10  -------------
    11  
    12  Make sure you have `hub` installed.
    13  
    14  ```
    15  brew install hub
    16  ```
    17  
    18  Releasing
    19  ---------
    20  
    21  1.  Set up some environment variables for use later.
    22  
    23      ```
    24      # This is the version being released.
    25      VERSION=1.21.0
    26  
    27      # This is the branch from which $VERSION will be released.
    28      # This is almost always dev.
    29      BRANCH=dev
    30      ```
    31  
    32      **If you are copying/pasting commands, make sure you actually set the right
    33      value for VERSION above.**
    34  
    35  2.  Make sure you have the latest master and create a new release branch off of
    36      it.
    37  
    38      ```
    39      git fetch origin dev
    40      git fetch origin master
    41      git checkout origin/master
    42      git checkout -B $(whoami)/release
    43      ```
    44  
    45  3.  Merge the branch with the changes being released into the newly created
    46      release branch.
    47  
    48      ```
    49      git merge $BRANCH
    50      ```
    51  
    52  4.  Alter the Unreleased entry in CHANGELOG.md to point to `$VERSION` and
    53      update the link at the bottom of the file. Use the format `YYYY-MM-DD` for
    54      the year.
    55  
    56      ```diff
    57      -## [Unreleased]
    58      +## [1.21.0] - 2017-10-23
    59      ```
    60  
    61      ```diff
    62      -[Unreleased]: https://github.com/yarpc/yarpc-go/compare/v1.20.1...HEAD
    63      +[1.21.0]: https://github.com/yarpc/yarpc-go/compare/v1.20.1...v1.21.0
    64      ```
    65  
    66  
    67  5.  Update the version number in version.go and verify that it matches what is
    68      in the changelog.
    69  
    70      ```
    71      sed -i '' -e "s/^const Version =.*/const Version = \"$VERSION\"/" version.go
    72      SUPPRESS_DOCKER=1 make verifyversion
    73      ```
    74  
    75  6.  Create a commit for the release.
    76  
    77      ```
    78      git add version.go CHANGELOG.md
    79      git commit -m "Preparing release v$VERSION"
    80      ```
    81  
    82  7.  Make a pull request with these changes against `master`.
    83  
    84      ```
    85      hub pull-request -b master --push
    86      ```
    87  
    88  8.  Land the pull request after approval as a **merge commit**. To do this,
    89      select **Create a merge commit** from the pull-down next to the merge
    90      button and click **Merge pull request**. Make sure you delete that branch
    91      after it has been merged with **Delete Branch**.
    92  
    93  9.  Once the change has been landed, pull it locally.
    94  
    95      ```
    96      git checkout master
    97      git pull
    98      ```
    99  
   100  10. Tag a release.
   101  
   102      ```
   103      hub release create -o -m v$VERSION -t master v$VERSION
   104      ```
   105  
   106  11. Copy the changelog entries for this release into the release description in
   107      the newly opened browser window.
   108  
   109  12. Go to <https://buildkite.com/uberopensource/yarpc-go/builds> and cancel the
   110      build for `v$VERSION`. If that Codecov build completes before the Codecov
   111      build for master, the code coverage for master will not get updated because
   112      only one branch gets updated per commit; this was verified with Codecov
   113      support. This will get tested by the build for master anyways.
   114  
   115  13. Switch back to development.
   116  
   117      ```
   118      git checkout $BRANCH
   119      git merge master
   120      ```
   121  
   122  14. Add a placeholder for the next version to CHANGELOG.md and a new link at
   123      the bottom.
   124  
   125      ```diff
   126      +## [Unreleased]
   127      +- No changes yet.
   128      +
   129       ## [1.21.0] - 2017-10-23
   130      ```
   131  
   132      ```diff
   133      +[Unreleased]: https://github.com/yarpc/yarpc-go/compare/v1.21.0...HEAD
   134       [1.21.0]: https://github.com/yarpc/yarpc-go/compare/v1.20.1...v1.21.0
   135      ```
   136  
   137  15. Update the version number in version.go to the same version.
   138  
   139      ```diff
   140      -const Version = "1.21.0"
   141      +const Version = "1.22.0-dev"
   142      ```
   143  
   144  16. Verify the version number matches.
   145  
   146      ```
   147      make verifyversion SUPPRESS_DOCKER=1
   148      ```
   149  
   150  17. Commit and push your changes.
   151  
   152      ```
   153      git add CHANGELOG.md version.go
   154      git commit -m 'Back to development'
   155      git push origin $BRANCH
   156      ```