Skip to content

Atmos version not being embedded in darwin_amd64 binary #129

Closed

Description

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

The Atmos version is not being properly embedded on Darwin AMD64 releases.

Expected Behavior

The Atmos version should be embedded properly just as it is currently embedded in Linux.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Download latest darwin_amd64 release
  2. Run atmos version
  3. See 0.0.1

Screenshots

$ atmos version
0.0.1

Environment (please complete the following information):

Anything that will help us triage the bug will help. Here are some ideas:

  • OS: Darwin (macOS Big Sur)
  • Version 1.4.0

Additional Context

This implementation works fine on linux_amd64

$ atmos version
1.4.0

The implementation itself is quite clear. We use ldflags to override cmd.Version using the environment variable exposed by goreleaser:

atmos/.goreleaser.yml

Lines 7 to 27 in c9c63b0

builds:
- env:
# goreleaser does not work with CGO, it could also complicate
# usage by users in CI/CD systems like Terraform Cloud where
# they are unable to install libraries.
- CGO_ENABLED=0
mod_timestamp: '{{ .CommitTimestamp }}'
goos:
- darwin
- freebsd
- windows
- linux
goarch:
- amd64
- '386'
- arm
- arm64
binary: atmos
ldflags:
# Set `atmos` version to the GitHub release tag using Go `ldflags`
- '-s -w -X "github.com/cloudposse/atmos/cmd.Version={{.Env.GORELEASER_CURRENT_TAG}}"'

Not sure why it's not working as expected.

Activity

  1. added
    bug
    on Mar 14, 2022
  2. aknysh commented on Apr 25, 2022

    @aknysh
    Member

    this is working.
    Download a darwin release, then run

    chmod +x atmos_1.4.11_darwin_amd64
    ./atmos_1.4.11_darwin_amd64 version
    

    The correct version (GitHub release) gets embedded into the binary when cutting releases on GitHub.
    if you build locally, the version that gets embedded is taken from the Makefile

    VERSION=test3
    
  3. added a commit that references this issue on Nov 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions