Skip to content

Commit

Permalink
proper version code
Browse files Browse the repository at this point in the history
  • Loading branch information
therealpaulgg committed Mar 20, 2023
1 parent ddbff36 commit d534fd1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
with:
go-version: ">=1.19.7"
- name: Go Build
run: go build -o ssh-sync
run: go build -o ssh-sync -ldflags "-X main.version=${{github.ref_name}}"
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
go-version: ">=1.19.7"
-
name: Go Build
run: go build -o ./win-build/ssh-sync.exe
run: go build -o ./win-build/ssh-sync.exe -ldflags "-X main.version=${{github.ref_name}}"
shell: powershell
-
name: Inno Build
Expand Down
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ import (
"github.com/urfave/cli/v2"
)

var version string

func main() {
app := &cli.App{
Name: "ssh-sync",
Version: "v0.2.4",
Version: version,
Description: "Syncs your ssh keys to a remote server",
Commands: []*cli.Command{
{
Expand Down

0 comments on commit d534fd1

Please sign in to comment.