diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 1633191a..a097efdc 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -27,7 +27,7 @@ jobs: apt-get install -y libbtrfs-dev libdevmapper-dev libgpgme-dev pkg-config build-essential libdpkg-dev - name: Build - run: go build -o abrootv2 + run: go build -o abrootv2 -ldflags="-X 'main.Version=${{ github.sha }}'" - name: Test run: go test -v ./tests/... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e8552eae..39ce16da 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: apt-get install -y libbtrfs-dev libdevmapper-dev libgpgme-dev pkg-config build-essential - name: Build - run: go build -o abrootv2 + run: go build -o abrootv2 -ldflags="-X 'main.Version=${{ github.ref_name }}'" - name: Compress run: tar -czvf abrootv2.tar.gz abrootv2 diff --git a/VERSION b/VERSION deleted file mode 100644 index 38f77a65..00000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -2.0.1 diff --git a/main.go b/main.go index 6b1770de..4bb226cc 100644 --- a/main.go +++ b/main.go @@ -22,7 +22,7 @@ import ( "github.com/vanilla-os/orchid/cmdr" ) -var Version = "2.0.1" +var Version = "development" //go:embed locales/*.yml var fs embed.FS