Skip to content

Commit

Permalink
Merge pull request exercism#889 from exercism/3.0.13-release-updates
Browse files Browse the repository at this point in the history
Update release documentation and configuration
  • Loading branch information
Katrina Owen authored Oct 24, 2019
2 parents b6f0cc2 + a9e53b6 commit 9272959
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 37 deletions.
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ release:
# Repo in which the release will be created.
# Default is extracted from the origin remote URL.
github:
owner: exercism
name: cli

# If set to true, will not auto-publish the release.
Expand Down
62 changes: 25 additions & 37 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,75 +10,63 @@ release process.
1. [Setup GitHub token](https://goreleaser.com/environment/#github-token)
1. Have a gpg key installed on your machine - it is [used for signing the artifacts](https://goreleaser.com/sign/)

## Confirm / Update the Changelog

Make sure all the recent changes are reflected in the "next release" section of the CHANGELOG.md file. All the changes in the "next release" section should be moved to a new section that describes the version number, and gives it a date.

You can view changes using the /compare/ view:
https://github.com/exercism/cli/compare/$PREVIOUS_RELEASE...master

GoReleaser supports the [auto generation of a changelog](https://goreleaser.com/customization/#customize-the-changelog) we will want to customize to meet our standards (not including refactors, test updates, etc). We should also consider using [the release notes feature](https://goreleaser.com/customization/#custom-release-notes).

## Bump the version

Edit the `Version` constant in `cmd/version.go`

_Note: It's useful to add the version to the commit message when you bump it: e.g. `Bump version to v2.3.4`._

In the future we will probably want to replace the hardcoded `Version` constant with [main.version](https://goreleaser.com/environment/#using-the-main-version). Here is a [stack overflow post on injecting to cmd/version.go](https://stackoverflow.com/a/47510909).

Commit this change on a branch along with the CHANGELOG updates in a single commit, and create a PR for merge to master.

## Cut a release

```bash

# Test run
goreleaser --skip-publish --snapshot --rm-dist

# Commit any changes, then create a new tag and push it
# Create a new tag on the master branch and push it
git tag -a v3.0.16 -m "Trying out GoReleaser"
git push origin v3.0.16

# Build and release
goreleaser --rm-dist

# Remember to update cmd/version.go in the code
# (until we use: https://goreleaser.com/environment/#using-the-main-version)

# You must be logged into snapcraft to publish a new snap
snapcraft login

# Push to snapcraft
for f in `ls dist/*.snap`; do snapcraft push --release=stable $f; done

# [TODO] Push to homebrew

# Run [exercism-cp-archive-hack.sh](https://gist.github.com/ekingery/961650fca4e2233098c8320f32736836) which takes the new archive files and renames them to match the old naming scheme for backward compatibility.
```

Lastly, head to [the release page](https://github.com/exercism/cli/releases) to test and publish the draft. Until mid to late 2020, we will need to manually upload the backward-compatible archive files generated in `/tmp/exercism_tmp_upload` by the shell script referenced above.


## Confirm / Update the Changelog

GoReleaser supports [auto generation of changelog](https://goreleaser.com/customization/#customize-the-changelog) that we will want to customize to meet our standards (not including refactors, test updates, etc). We should also consider [the release notes](https://goreleaser.com/customization/#custom-release-notes).

Make sure all the recent changes are reflected in the "next release" section
of the Changelog. Make this a separate commit from bumping the version.

You can view changes using the /compare/ view:
https://github.com/exercism/cli/compare/$PREVIOUS_RELEASE...master


## Bump the version

Edit the `Version` constant in `cmd/version.go`, and edit the Changelog.

All the changes in the "next release" section should be moved to a new section
that describes the version number, and gives it a date.

The "next release" section should contain only "Your contribution here".

_Note: It's useful to add the version to the commit message when you bump it: e.g. `Bump version to v2.3.4`._

In the future we will probably want to replace the hardcoded `Version` constant with [main.version](https://goreleaser.com/environment/#using-the-main-version). Here is a [stack overflow post on injecting to cmd/version.go](https://stackoverflow.com/a/47510909).

## Cut Release on GitHub

Go to [the exercism/cli "new release" page](https://github.com/exercism/cli/releases/new).
Run [exercism-cp-archive-hack.sh](https://gist.github.com/ekingery/961650fca4e2233098c8320f32736836) which takes the new archive files and renames them to match the old naming scheme for backward compatibility. Until mid to late 2020, we will need to manually upload the backward-compatible archive files generated in `/tmp/exercism_tmp_upload`.

A draft will have been auto-generated by GoReleaser. Describe the release, select a specific commit to target, paste the release text and describe the new changes.
The generated archive files should be uploaded to the [draft release page created by GoReleaser](https://github.com/exercism/cli/releases). Describe the release, select a specific commit to target, paste the following release text, and describe the new changes.

```
To install, follow the interactive installation instructions at https://exercism.io/cli-walkthrough
---
[describe changes in this release]
```

Lastly, test and publish the draft


## Update Homebrew

This is helpful for the (many) Mac OS X users.
Expand Down

0 comments on commit 9272959

Please sign in to comment.