Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #262 from puppetlabs/maint/main/fix_changelog_0_5_0
Browse files Browse the repository at this point in the history
(MAINT) Add 0.5.0 heading in CHANGELOG
  • Loading branch information
da-ar authored Oct 26, 2021
2 parents 915eb58 + a5b2466 commit d365a90
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
Where-Object { $_ -match '^\d+\.\d+\.\d+$' } |
Sort-Object -Descending |
Select-Object -First 1
echo "::set-output name=tag::0.4.0 d18bd02"
echo "::set-output name=tag::$TagVersion"
- name: Install PCT (Windows)
if: runner.os == 'Windows'
shell: pwsh
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.5.0]
### Added

- [(GH-222)](https://github.com/puppetlabs/pdkgo/issues/222) Telemetry to the binary, which will report the operating system type and architecture when a command is run; the implementation allows for two binaries: one with telemetry configured and enabled, and one _without_ the telemetry included at all. <!-- For more information, see our [telemetry blog post](link to blog). -->
Expand Down Expand Up @@ -72,6 +72,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [(GH-29)](https://github.com/puppetlabs/pdkgo/issues/29) Error if template not found

[Unreleased]: https://github.com/puppetlabs/pdkgo/compare/0.4.0..main
[0.5.0]: https://github.com/puppetlabs/pdkgo/releases/tag/0.5.0
[0.4.0]: https://github.com/puppetlabs/pdkgo/releases/tag/0.4.0
[0.3.0]: https://github.com/puppetlabs/pdkgo/releases/tag/0.3.0
[0.2.0]: https://github.com/puppetlabs/pdkgo/releases/tag/0.2.0
Expand Down
72 changes: 72 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Releasing a New Version

We use [`goreleaser`](https://github.com/goreleaser/goreleaser) to release new packages.
Once the commit we want to release at, is tagged, the [release workflow](https://github.com/puppetlabs/pdkgo/blob/main/.github/workflows/release.yml) executes, which will:
- Generate the build artefacts
- Create a new [release](https://github.com/puppetlabs/pdkgo/releases) in Github

## Create and merge release prep PR

- Create a new branch from `puppetlabs/main` called `maint/main/release_prep_<VER>` (e.g. `maint/main/release_prep_0.5.0`)
- Ensure the `CHANGELOG` is up-to-date and contains entries for any user visible new features / bugfixes. This should have been added as part of each ticket's work, but sometimes things are missed:

>> Compare the changes between `main` and the latest release tag:
>>
>> For example: https://github.com/puppetlabs/pdkgo/compare/0.5.0..main
- Rename `[Unreleased]` to the version we are releasing and create a new `[Unreleased]` header at the top of the `CHANGELOG`:

```md
## [Unreleased]

## [0.5.0]

- [(GH-123)](https://github.com/puppetlabs/pdkgo/issues/123) New feature in 0.5.0
- [(GH-567)](https://github.com/puppetlabs/pdkgo/issues/567) Bug fix in 0.5.0
```

- Update the links at the bottom of the `CHANGELOG` with the new release version and update the `[Unreleased]` tag to compare from the version we're releasing now against `main`:

```md
[Unreleased]: https://github.com/puppetlabs/pdkgo/compare/0.5.0..main
[0.5.0]: https://github.com/puppetlabs/pdkgo/releases/tag/0.5.0
[0.4.0]: https://github.com/puppetlabs/pdkgo/releases/tag/0.4.0
...
```

- Add and commit these changes
- Create a PR against `main`:
- Tag: `maintenance`
- Wait for the tests to pass
- Request a colleage to review and merge

## Tag merge commit

After the release prep PR has been merged, perform a `git fetch` and `git pull` and ensure you are on the merged commit of the release prep that has just landed in [`puppetlabs:main`](https://github.com/puppetlabs/pdkgo/commits/main).

Tag the merged commit and push to `puppetlabs`:

```sh
git tag -a <VER> -m "PCT <VER>"
git push <remote> <VER>
```

For example, assuming:
- **Locally configured remote repo name for `puppetlabs`:** `origin`
- **Version:** `0.5.0`

```sh
git tag -a 0.5.0 -m "PCT 0.5.0"
git push origin 0.5.0
```

This should trigger the [release worfklow](https://github.com/puppetlabs/pdkgo/actions/workflows/release.yml) to perform the release.
Ensure the workflow completes, then move on to the final steps.

## Perform post release installation tests

- Ensure that there is a new release for the version we tagged in [Releases](https://github.com/puppetlabs/pdkgo/releases), with:
- The correct version
- The expected number of build artefacts
- Perform a quick test locally to ensure that the [installation instructions in the README](https://github.com/puppetlabs/pdkgo/blob/main/README.md#installing) work and that the latest version is installed on your local system / test system
- Repeat the above steps for the [Telemetry free version](https://github.com/puppetlabs/pdkgo/blob/main/README.md#installing-telemetry-free-version)
3 changes: 1 addition & 2 deletions tools/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ fi

RELEASES=""
FILE=""
VER=""
CHECKSUM=""

logDebug() {
Expand All @@ -38,7 +37,7 @@ getChecksums() {
echo "Fetching checksums.txt failed on attempt ${i}, retrying..."
sleep 5
else
CHECKSUM=$(grep ${FILE} /tmp/pct_checksums.txt | cut -d ' ' -f 1)
CHECKSUM=$(grep " ${FILE}" /tmp/pct_checksums.txt | cut -d ' ' -f 1)
return 0
fi
done
Expand Down

0 comments on commit d365a90

Please sign in to comment.