Skip to content

Commit

Permalink
Merge pull request #59 from cyberark/version-bump-0.4.1
Browse files Browse the repository at this point in the history
Bump version to 0.4.1
  • Loading branch information
john-odonnell authored May 13, 2022
2 parents e991224 + 4cc942c commit 8bcfecf
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 10 deletions.
17 changes: 16 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ builds:

archives:
- id: summon-aws-secrets
name_template: "{{.ProjectName}}-{{.Version}}-{{.Os}}-{{.Arch}}"
name_template: "{{.ProjectName}}-{{.Os}}-{{.Arch}}"
format_overrides:
- goos: windows
format: zip
Expand All @@ -43,6 +43,21 @@ archives:
- LICENSE
- SECURITY.md

brews:
- description: AWS Secrets Manager provider for Summon
homepage: https://github.com/cyberark/summon-aws-secrets
url_template: https://github.com/cyberark/summon/releases/download/v{{.Version}}/summon-aws-secrets-{{ tolower .Os }}-{{ tolower .Arch }}.tar.gz
install: |
target = lib/"summon"
target.install "summon-aws-secrets"
test: |
system lib/"summon"/"summon-aws-secrets", "-v"
tap:
owner: cyberark
name: homebrew-tools
skip_upload: true

checksum:
name_template: 'SHA256SUMS.txt'

Expand Down
46 changes: 46 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,49 @@ For general contribution and community guidelines, please see the [community rep
From here your pull request will be reviewed and once you've responded to all
feedback it will be merged into the project. Congratulations, you're a
contributor!

## Releasing

### Update the version and changelog

1. Examine the changelog and decide on the version bump rank (major, minor, patch).
2. Change the title of _Unreleased_ section of the changelog to the target version.
- Be sure to add the date (ISO 8601 format) to the section header.
3. Add a new, empty _Unreleased_ section to the changelog.
- Remember to update the references at the bottom of the document.
4. Update `VERSION` and `version.go` files to reflect the version change.
5. Commit these changes. `Bump version to x.y.z` is an acceptable commit message.
6. Push your changes to a branch, and get the PR reviewed and merged.

### Tag the version

1. Tag the version on the master branch using `git tag -s vx.y.z -m vx.y.z`.
Note this requires you to be able to sign releases. Consult the
[GitHub documentation on signing commits](https://docs.github.com/en/authentication/managing-commit-signature-verification)
to set this up.
2. Push the tag: `git push vx.y.z` (or `git push origin vx.y.z` if you are
working from your local machine).

### Add a new GitHub release

1. Create a new release from the tag in the GitHub UI.
2. Add the changelog for the current version to the release description.
3. Retrieve the following artifacts from the Jenkins build on the tagged branch,
and attach them to the release:
- `SHA256SUMS.txt`
- `summon-aws-secrets-darwin-amd64.tar.gz`
- `summon-aws-secrets-darwin-arm64.tar.gz`
- `summon-aws-secrets-freebsd-amd64.tar.gz`
- `summon-aws-secrets-linux-amd64.tar.gz`
- `summon-aws-secrets-netbsd-amd64.tar.gz`
- `summon-aws-secrets-openbsd-amd64.tar.gz`
- `summon-aws-secrets-solaris-amd64.tar.gz`
- `summon-aws-secrets-windows-amd64.tar.gz`

### Update Homebrew Tools

1. Create a PR in [`cyberark/homebrew-tools`](https://github.com/cyberark/homebrew-tools)
to update [`summon-aws-secrets.rb` formula](https://github.com/cyberark/homebrew-tools/blob/master/summon-aws-secrets.rb)
using the file `dist/summon-aws-secrets.rb` retrieved from Jenkins artifacts.
- Make sure the SHA hashes for the artifacts match the values in the
`SHA256SUMS.txt` file attached to the release.
24 changes: 21 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,27 @@ pipeline {
}

stage('Build Go binaries') {
steps {
sh './bin/build'
archiveArtifacts artifacts: 'dist/*', fingerprint: true
stages {
stage('Release artifacts') {
when {
buildingTag()
}
steps {
sh './bin/build'
archiveArtifacts artifacts: 'dist/*', fingerprint: true
}
}
stage('Snapshot artifacts') {
when {
not {
buildingTag()
}
}
steps {
sh './bin/build --snapshot'
archiveArtifacts artifacts: 'dist/*', fingerprint: true
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.0
0.4.1
7 changes: 3 additions & 4 deletions bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

function main() {
retrieve_cyberark_ca_cert
build_binaries
build_binaries "$@"

# Needed for testing stages
goos='linux'
Expand Down Expand Up @@ -45,8 +45,7 @@ function build_binaries() {

echo "> Building and packaging binaries"
docker-compose run --rm \
goreleaser release --rm-dist --snapshot
goreleaser release --rm-dist --skip-publish --skip-announce --skip-validate "$@"
}

main

main "$@"
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package main

const VERSION = "0.4.0"
const VERSION = "0.4.1"

0 comments on commit 8bcfecf

Please sign in to comment.