change system.Version to var so we can set at build
This commit is contained in:
parent
7516ef1aa4
commit
31d00333a7
4
.github/workflows/build-test.yml
vendored
4
.github/workflows/build-test.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
||||||
go-version: '^1.14.2'
|
go-version: '^1.14.2'
|
||||||
|
|
||||||
- name: Build
|
- 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
|
- name: Test
|
||||||
run: go test ./...
|
run: go test ./...
|
||||||
|
@ -30,4 +30,4 @@ jobs:
|
||||||
if: ${{ github.ref == 'refs/heads/develop' || github.event_name == 'pull_request' }}
|
if: ${{ github.ref == 'refs/heads/develop' || github.event_name == 'pull_request' }}
|
||||||
with:
|
with:
|
||||||
name: wings_linux_amd64
|
name: wings_linux_amd64
|
||||||
path: build/wings_linux_amd64
|
path: build/wings_linux_amd64
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package system
|
package system
|
||||||
|
|
||||||
const (
|
var (
|
||||||
// The current version of this software.
|
// The current version of this software.
|
||||||
Version = "0.0.1"
|
Version = "0.0.1"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user