Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Include commit and date in version #3159

Merged
merged 1 commit into from
Feb 24, 2023

Conversation

nitrocode
Copy link
Member

@nitrocode nitrocode commented Feb 24, 2023

what

  • Include commit and date in version
  • Allow forward slash make targets in make help

why

  • When new versions are built, we will be able to see the exact commit hash on the pod/ec2 where atlantis is deployed as well as its user interface
  • This will help a lot if people use the dev image tag which currently does not show its short git sha in the tag itself (except in the image labels)

tests

  • I have tested my changes by running atlantis version locally
✗ go build -v -o atlantis .
✗ ./atlantis version
atlantis dev (commit: none) (build date: unknown)

With appropriate inputs that will come from goreleaser and in the Dockerfile

✗ go build -trimpath -ldflags "-s -w -X 'main.version=v0.99.0' -X 'main.commit=db70ffe' -X 'main.date=2022-02-24'" -v -o atlantis
✗ ./atlantis version
atlantis v0.99.0 (commit: db70ffe) (build date: 2022-02-24)

references

@nitrocode nitrocode added this to the v0.23.0 milestone Feb 24, 2023
@nitrocode nitrocode requested a review from a team as a code owner February 24, 2023 13:27
@github-actions github-actions bot added github-actions go Pull requests that update Go code labels Feb 24, 2023
@nitrocode nitrocode force-pushed the include-commit-in-version branch from db70ffe to f5172ef Compare February 24, 2023 13:28
@nitrocode nitrocode force-pushed the include-commit-in-version branch from f5172ef to 6164b25 Compare February 24, 2023 13:28
@nitrocode nitrocode force-pushed the include-commit-in-version branch from 6164b25 to cffe5d3 Compare February 24, 2023 13:32
@nitrocode nitrocode force-pushed the include-commit-in-version branch from cffe5d3 to 6f7591a Compare February 24, 2023 13:33
@nitrocode nitrocode force-pushed the include-commit-in-version branch from 6f7591a to 2b9ec65 Compare February 24, 2023 13:34
@nitrocode nitrocode merged commit f83f769 into runatlantis:main Feb 24, 2023
@nitrocode nitrocode deleted the include-commit-in-version branch February 24, 2023 23:59
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants