diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c1303c81e..eaf288424 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,11 +18,11 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version-file: go.mod - name: Run GoReleaser for stable release uses: goreleaser/goreleaser-action@v4 - if: (!contains(github.ref, '-pre.')) + if: (!contains(github.ref, 'pre')) with: version: v0.183.0 args: release --rm-dist @@ -30,7 +30,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Generate changelog for pre release - if: contains(github.ref, '-pre.') + if: contains(github.ref, 'pre') id: changelog run: | echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT @@ -43,7 +43,7 @@ jobs: - name: Run GoReleaser for pre-release uses: goreleaser/goreleaser-action@v4 - if: contains(github.ref, '-pre.') + if: contains(github.ref, 'pre') with: version: v0.183.0 args: release --rm-dist --release-notes=tmp-CHANGELOG.md @@ -55,7 +55,7 @@ jobs: name: "Bump Homebrew formula" runs-on: ubuntu-22.04 if: false - # if: (!contains(github.ref, '-pre.')) + # if: (!contains(github.ref, 'pre')) steps: - uses: mislav/bump-homebrew-formula-action@v2 with: diff --git a/kustomize/bundle.yaml b/kustomize/bundle.yaml index 0ffbd75ad..ac9fadc7e 100644 --- a/kustomize/bundle.yaml +++ b/kustomize/bundle.yaml @@ -22,7 +22,7 @@ spec: fsGroup: 1000 # Atlantis group (1000) read/write access to volumes. containers: - name: atlantis - image: ghcr.io/runatlantis/atlantis:v0.22.3 + image: ghcr.io/runatlantis/atlantis:latest env: - name: ATLANTIS_DATA_DIR value: /atlantis diff --git a/main.go b/main.go index f832a2864..fec234723 100644 --- a/main.go +++ b/main.go @@ -24,9 +24,17 @@ import ( "github.com/spf13/viper" ) -const atlantisVersion = "0.22.3" +// All of this is filled in by goreleaser upon release +// https://goreleaser.com/cookbooks/using-main.version/ +var ( + version = "dev" + commit = "none" + date = "unknown" +) func main() { + fmt.Printf("atlantis %s, commit %s, built at %s", version, commit, date) + v := viper.New() logger, err := logging.NewStructuredLogger() @@ -40,10 +48,10 @@ func main() { server := &cmd.ServerCmd{ ServerCreator: &cmd.DefaultServerCreator{}, Viper: v, - AtlantisVersion: atlantisVersion, + AtlantisVersion: version, Logger: logger, } - version := &cmd.VersionCmd{AtlantisVersion: atlantisVersion} + version := &cmd.VersionCmd{AtlantisVersion: version} testdrive := &cmd.TestdriveCmd{} cmd.RootCmd.AddCommand(server.Init()) cmd.RootCmd.AddCommand(version.Init())