From c275707eccf06786c1a092c486fecbe0519d67ac Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Sat, 26 Dec 2020 00:58:43 +0300 Subject: Correct release.yml autobuild --- .github/workflows/release.yml | 6 +++--- cmd/main.go | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b1cd83ae..97a412fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,10 +55,10 @@ jobs: CGO_ENABLED: 0 LDFLAGS: >- -s - -X github.com/spiral/roadrunner/cmd/rr/cmd.Version=${{ steps.values.outputs.version }} - -X github.com/spiral/roadrunner/cmd/rr/cmd.BuildTime=${{ steps.values.outputs.timestamp }} + -X github.com/spiral/roadrunner/cmd/main.Version=${{ steps.values.outputs.version }} + -X github.com/spiral/roadrunner/cmd/main.BuildTime=${{ steps.values.outputs.timestamp }} run: | - go build -trimpath -ldflags "$LDFLAGS" -o "./${{ steps.values.outputs.binary-name }}" ./cmd/rr/main.go + go build -trimpath -ldflags "$LDFLAGS" -o "./${{ steps.values.outputs.binary-name }}" ./cmd/main.go stat "./${{ steps.values.outputs.binary-name }}" - name: Generate distributive directory name diff --git a/cmd/main.go b/cmd/main.go index 4e7fc099..36638836 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -17,6 +17,14 @@ import ( "github.com/spiral/roadrunner/v2/plugins/rpc" ) +var ( + // Version - defines build version. + Version = "local" + + // BuildTime - defined build time. + BuildTime = "development" +) + func main() { var err error cli.Container, err = endure.NewContainer(nil, endure.SetLogLevel(endure.ErrorLevel), endure.RetryOnFail(false)) -- cgit v1.2.3