change system.Version to var so we can set at build

This commit is contained in:
Jakob Schrettenbrunner 2020-07-05 01:26:36 +00:00
parent 7516ef1aa4
commit 31d00333a7
2 changed files with 3 additions and 3 deletions

View File

@ -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
path: build/wings_linux_amd64

View File

@ -1,6 +1,6 @@
package system
const (
var (
// The current version of this software.
Version = "0.0.1"
)