mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Automate releng a bit more (#1006)
This commit is contained in:
@ -19,24 +19,18 @@ go version
|
||||
```
|
||||
|
||||
|
||||
## Step 2. Check unit and integration tests
|
||||
## Step 2. Create a new release branch
|
||||
|
||||
There's a GitHub Actions [workflow](https://github.com/StackExchange/dnscontrol/actions?query=workflow%3Abuild) which builds the code and runs a set of unit and integration tests. Make sure all tests are passing, including the integration tests for all DNS providers.
|
||||
From the "master" branch, run `bin/bin/make-release.sh v1.2.3` where
|
||||
"v1.2.3" should be the release version.
|
||||
|
||||
This will do a few things.
|
||||
|
||||
## Step 3. Bump the version number
|
||||
|
||||
Edit the "Version" variable in `pkg/version/version.go` and commit.
|
||||
|
||||
```
|
||||
export PREVVERSION=3.3.0 <<< Change to the previous version
|
||||
export VERSION=3.4.0 <<< Change to the new release version
|
||||
git checkout master
|
||||
vi main.go <<< Change "Version" to new release version
|
||||
git commit -m'Release v'"$VERSION" main.go
|
||||
git tag v"$VERSION"
|
||||
git push origin tag v"$VERSION"
|
||||
```
|
||||
1. Tag the current branch locally and remotely.
|
||||
2. Update main.go with the new version string.
|
||||
3. Create a file called draft-notes.txt which you will edit into the
|
||||
release notes.
|
||||
4. Print instructions on how to create the release PR.
|
||||
|
||||
NOTE: If you bump the major version, you need to change all the source
|
||||
files. The last time this was done (v2 -> v3) these two commands
|
||||
@ -49,13 +43,11 @@ sed -i.bak -e 's@github.com.StackExchange.dnscontrol.v2@github.com/StackExchange
|
||||
find * -name \*.bak -delete
|
||||
```
|
||||
|
||||
## Step 4. Write the release notes.
|
||||
## Step 3. Write the release notes.
|
||||
|
||||
The release notes that you write will be used in a few places.
|
||||
|
||||
To find items to write about, review the git log using this command:
|
||||
|
||||
git log v"$VERSION"...v"$PREVVERSION"
|
||||
draft-notes.txt is just a draft and needs considerable editing.
|
||||
|
||||
Entries in the bullet list should be phrased in the positive: "Feature
|
||||
FOO now does BAR". This is often the opposite of the related issue,
|
||||
@ -94,7 +86,7 @@ Provider-specific changes:
|
||||
* CLOUDFLARE: Fix CF trying to update non-changeable TTL (#issueid)
|
||||
```
|
||||
|
||||
## Step 5. Make the draft release.
|
||||
## Step 4. Make the draft release.
|
||||
|
||||
[On github.com, click on "Draft a new release"](https://github.com/StackExchange/dnscontrol/releases/new)
|
||||
|
||||
@ -112,6 +104,9 @@ Fill in the text box with the release notes written above.
|
||||
|
||||
(DO use the "preview" tab to proofread the text.)
|
||||
|
||||
## Step 5. Merge the release.
|
||||
|
||||
Merge the PR into Master.
|
||||
|
||||
## Step 6. Publish the release
|
||||
|
||||
@ -119,7 +114,7 @@ a. Publish the release.
|
||||
|
||||
Make sure the "This is a pre-release" checkbox is UNchecked. Then click "Publish Release".
|
||||
|
||||
b. Wait for workflow to complete
|
||||
b. Wait for workflow to complete
|
||||
|
||||
There's a GitHub Actions [workflow](https://github.com/StackExchange/dnscontrol/actions?query=workflow%3Arelease) which automatically builds and attaches
|
||||
all 3 binaries to the release. Refresh the page after a few minutes and you'll
|
||||
@ -164,11 +159,11 @@ If you are at Stack Overflow:
|
||||
|
||||
# Tip: How to update modules
|
||||
|
||||
List out-of-date modules and update any that
|
||||
List out-of-date modules and update any that
|
||||
|
||||
```
|
||||
go get -u github.com/psampaz/go-mod-outdated
|
||||
go list -mod=mod -u -m -json all | go-mod-outdated -update -direct
|
||||
go list -mod=mod -u -m -json all | go-mod-outdated -update -direct
|
||||
```
|
||||
|
||||
To update a module, `get` it, then re-run the unit and integration tests.
|
||||
|
Reference in New Issue
Block a user