Skip to content

Commit

Permalink
Merge pull request #42 from joemiller/rename-master-to-main
Browse files Browse the repository at this point in the history
  • Loading branch information
joemiller committed Mar 1, 2022
2 parents ddeeea3 + 51aaf63 commit 177ee13
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 13 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: install goreleaser
# only need to lint goreleaser on one platform:
if: startsWith(runner.os, 'Linux')
run : |
run: |
#curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sudo sh -s -- -b /usr/local/bin
curl -sfL https://github.com/goreleaser/goreleaser/releases/download/v0.183.0/goreleaser_Linux_x86_64.tar.gz | tar -xvzf - goreleaser
sudo mv goreleaser /usr/local/bin
Expand Down Expand Up @@ -74,12 +74,14 @@ jobs:

release-test:
needs: [lint, test]
# don't waste time running a goreleaser test build on master since we will run a full release:
if: github.ref != 'refs/heads/master'
# don't waste time running a goreleaser test build on main since we will run a full release:
if: github.ref != 'refs/heads/main'
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.17.x

- name: go mod cache
uses: actions/cache@v1
Expand Down Expand Up @@ -126,12 +128,14 @@ jobs:

release:
needs: [lint, test]
# only create a release on master builds:
if: github.ref == 'refs/heads/master'
# only create a release on main builds:
if: github.ref == 'refs/heads/main'
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.17.x

- name: go mod cache
uses: actions/cache@v1
Expand Down Expand Up @@ -170,9 +174,9 @@ jobs:
# and autotag can calculate the next version tag:
git fetch --tags --unshallow --prune
if [ $(git rev-parse --abbrev-ref HEAD) != "master" ]; then
# ensure a local 'master' branch exists for autotag to work correctly:
git branch --track master origin/master
if [ $(git rev-parse --abbrev-ref HEAD) != "main" ]; then
# ensure a local 'main' branch exists for autotag to work correctly:
git branch --track main origin/main
fi
- name: install release deps
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,20 +218,20 @@ The most complete way to run all tests would be to run `make test` under each pl

[Github Actions](https://github.com/joemiller/vault-token-helper/actions) is used for CI/CD.

Tests are run on pull requests and versioned releases are generated on all successful master branch
Tests are run on pull requests and versioned releases are generated on all successful main branch
builds.

Some tests are not run in CI/CD due to requiring an interactive desktop such as the Linux
DBus Secret Service backend.

### Release Management

Releases are cut automatically on all successful master branch builds. This project uses
Releases are cut automatically on all successful main branch builds. This project uses
[autotag](https://github.com/pantheon-systems/autotag) and [goreleaser](https://goreleaser.com/) to
automate this process.

Semver (`vMajor.Minor.Patch`) is used for versioning and releases. By default, autotag will bump the
patch version on a successful master build, eg: `v1.0.0` -> `v1.0.1`.
patch version on a successful main build, eg: `v1.0.0` -> `v1.0.1`.

To bump the major or minor release instead, include `[major]` or `[minor]` in the commit message.
Refer to the autotag [docs](https://github.com/pantheon-systems/autotag#incrementing-major-and-minor-versions)
Expand Down
41 changes: 39 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
module github.com/joemiller/vault-token-helper

go 1.16
go 1.17

require (
github.com/99designs/keyring v0.0.0-20190704105226-2c916c935b9f
github.com/PuerkitoBio/purell v1.1.0
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/hashicorp/vault/api v1.0.2
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
github.com/mitchellh/go-homedir v1.1.0
Expand All @@ -15,6 +14,44 @@ require (
github.com/stretchr/testify v1.3.0
)

require (
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/danieljoos/wincred v1.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a // indirect
github.com/fsnotify/fsnotify v1.4.7 // indirect
github.com/godbus/dbus v4.1.0+incompatible // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
github.com/hashicorp/go-multierror v1.0.0 // indirect
github.com/hashicorp/go-retryablehttp v0.5.3 // indirect
github.com/hashicorp/go-rootcerts v1.0.0 // indirect
github.com/hashicorp/go-sockaddr v1.0.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/vault/sdk v0.1.8 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/keybase/go-keychain v0.0.0-20190604185112-cc436cc9fe98 // indirect
github.com/magiconair/properties v1.8.0 // indirect
github.com/mitchellh/mapstructure v1.1.2 // indirect
github.com/pelletier/go-toml v1.2.0 // indirect
github.com/pierrec/lz4 v2.0.5+incompatible // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/spf13/afero v1.1.2 // indirect
github.com/spf13/cast v1.3.0 // indirect
github.com/spf13/jwalterweatherman v1.0.0 // indirect
github.com/spf13/pflag v1.0.3 // indirect
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 // indirect
golang.org/x/net v0.0.0-20190628185345-da137c7871d7 // indirect
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb // indirect
golang.org/x/text v0.3.2 // indirect
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
gopkg.in/square/go-jose.v2 v2.3.1 // indirect
gopkg.in/yaml.v2 v2.2.2 // indirect
)

// replace github.com/99designs/keyring v0.0.0-20190531235905-2e3b4e59b02e => ../keyring
// replace github.com/99designs/keyring v0.0.0-20190531235905-2e3b4e59b02e => github.com/joemiller/keyring v0.0.0-20190624143912-6409680b37b7b84fe91df0532f82861e9e4343c8
// replace github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c => ../go-libsecret

0 comments on commit 177ee13

Please sign in to comment.