summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/release.yml6
-rw-r--r--cmd/main.go8
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))