From 31d00333a7461cec56e91af83bdb0c5f21a061b7 Mon Sep 17 00:00:00 2001 From: Jakob Schrettenbrunner Date: Sun, 5 Jul 2020 01:26:36 +0000 Subject: [PATCH] change system.Version to var so we can set at build --- .github/workflows/build-test.yml | 4 ++-- system/const.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index f0405d8..8b72274 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -17,7 +17,7 @@ jobs: go-version: '^1.14.2' - name: Build - run: GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -ldflags "-X system.Version=dev-${GIT_COMMIT:0:7}" -o build/wings_linux_amd64 -v wings.go + run: GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -ldflags "-X github.com/pterodactyl/wings/system.Version=dev-${GIT_COMMIT:0:7}" -o build/wings_linux_amd64 -v wings.go - name: Test run: go test ./... @@ -30,4 +30,4 @@ jobs: if: ${{ github.ref == 'refs/heads/develop' || github.event_name == 'pull_request' }} with: name: wings_linux_amd64 - path: build/wings_linux_amd64 \ No newline at end of file + path: build/wings_linux_amd64 diff --git a/system/const.go b/system/const.go index 435b270..87d87fb 100644 --- a/system/const.go +++ b/system/const.go @@ -1,6 +1,6 @@ package system -const ( +var ( // The current version of this software. Version = "0.0.1" )