Skip to content

Commit 5080211

Browse files
authored
chore: prepare 6.8.2 release (#271)
1 parent a1f2cc0 commit 5080211

5 files changed

Lines changed: 35 additions & 2 deletions

File tree

.github/workflows/user-agent.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Lint
2+
on:
3+
pull_request:
4+
paths:
5+
- CHANGELOG.md
6+
jobs:
7+
update_user_agent:
8+
name: Check version in User-Agent
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- run: ./scripts/update-user-agent-version.sh
13+
- uses: stefanzweifel/git-auto-commit-action@v5
14+
with:
15+
commit_message: "chore: update version in `User-Agent`"
16+
file_pattern: upcloud/client/client.go

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.
44
See updating [Changelog example here](https://keepachangelog.com/en/1.0.0/)
55

66
## [Unreleased]
7+
## [6.8.2]
78
### Added
89
- account: `NetworkPeerings`, `NTPExcessGiB`, `StorageMaxIOPS`, and `LoadBalancers` fields to the `ResourceLimits` struct.
910

RELEASING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
1. Add new heading with the correct version e.g. `## [6.7.0]`
77
2. Update links at the bottom of the page
88
3. Leave `## Unreleased` section at the top empty
9-
4. Update `Version` in [upcloud/client/client.go](./upcloud/client/client.go)
9+
4. Check that `Version` in [upcloud/client/client.go](./upcloud/client/client.go) is up-to-date. The value is automatically updated by GitHub Actions.
1010
5. Test GoReleaser config with `goreleaser check`
1111
6. Tag a commit with the version you want to release e.g. `v6.7.0`
1212
7. Push the tag & commit to GitHub
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/sh -x
2+
# This script should work on Ubuntu sh. On other systems (e.g., alpine or macOS) there might be differences in echo and sed commands that can cause unexpected changes.
3+
4+
version_re="[0-9]+\.[0-9]+\.[0-9]+"
5+
6+
changelog=$(grep -E -m 1 "##.*$version_re.*" CHANGELOG.md | grep -Eo "$version_re");
7+
user_agent=$(grep -E -m 1 "Version.*$version_re.*" upcloud/client/client.go | grep -Eo "$version_re")
8+
9+
if [ "$changelog" = "$user_agent" ]; then
10+
exit 0;
11+
fi;
12+
13+
latest=$(echo "$changelog\n$user_agent" | sort -V | tail -n1)
14+
15+
sed -Ei "s/(##.*)$changelog(.*)/\1$latest\2/" CHANGELOG.md;
16+
sed -Ei "s/(.*Version.*\")$user_agent(\".*)/\1$latest\2/" upcloud/client/client.go;

upcloud/client/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
)
1616

1717
const (
18-
Version string = "6.8.1"
18+
Version string = "6.8.2"
1919
APIVersion string = "1.3"
2020
APIBaseURL string = "https://api.upcloud.com"
2121

0 commit comments

Comments
 (0)