✨ Detailed version
All checks were successful
release-nightly / build-docker (push) Successful in 1m2s
All checks were successful
release-nightly / build-docker (push) Successful in 1m2s
This commit is contained in:
parent
8f1ac85148
commit
0d8583e395
@ -3,7 +3,7 @@ FROM golang:alpine as roadsign-server
|
||||
|
||||
WORKDIR /source
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /dist ./pkg/cmd/server/main.go
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -buildvcs -o /dist ./pkg/cmd/server/main.go
|
||||
|
||||
# Runtime
|
||||
FROM golang:alpine
|
||||
|
@ -59,7 +59,8 @@ After that, you can manage your roadsign instance with RoadSign CLI aka. RDS CLI
|
||||
To install it, run this command. (Make sure you have golang toolchain on your computer)
|
||||
|
||||
```shell
|
||||
go install code.smartsheep.studio/goatworks/roadsign/pkg/cmd/rds@latest
|
||||
go install -buildvcs code.smartsheep.studio/goatworks/roadsign/pkg/cmd/rds@latest
|
||||
# Tips: Add `buildvsc` flag to provide more detail compatibility check.
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
16
pkg/meta.go
16
pkg/meta.go
@ -1,5 +1,17 @@
|
||||
package roadsign
|
||||
|
||||
const (
|
||||
AppVersion = "1.2.1"
|
||||
import (
|
||||
"runtime/debug"
|
||||
)
|
||||
|
||||
func init() {
|
||||
if info, ok := debug.ReadBuildInfo(); ok {
|
||||
for _, setting := range info.Settings {
|
||||
if setting.Key == "vcs.revision" {
|
||||
AppVersion += "#" + setting.Value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var AppVersion = "1.2.1"
|
||||
|
Loading…
Reference in New Issue
Block a user