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 authored 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.