Skip to content

Commit

Permalink
one more try
Browse files Browse the repository at this point in the history
  • Loading branch information
alessio committed Dec 29, 2023
1 parent 781787c commit 1edbd63
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ before:
hooks:
- make clean
- go generate ./...
- cat ./version/version.txt
- go mod tidy

gomod:
Expand Down
4 changes: 2 additions & 2 deletions version/generate_version.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
SELF_DIR=$(SELF=$(dirname "$0") && bash -c "cd \"$SELF\" && pwd")
#!/bin/sh
SELF_DIR=$(SELF=$(dirname "$0") && sh -c "cd \"$SELF\" && pwd")
GIT_VERSION=$(git describe --abbrev=6 2>/dev/null || echo "v0.0.0-UNKNOWN")
echo "${GIT_VERSION}" > "${SELF_DIR}/version.txt"
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
_ "embed"
)

//go:generate bash generate_version.sh
//go:generate sh generate_version.sh
//go:embed version.txt

Check failure on line 11 in version/version.go

View workflow job for this annotation

GitHub Actions / test

pattern version.txt: no matching files found

Check failure on line 11 in version/version.go

View workflow job for this annotation

GitHub Actions / lint

pattern version.txt: no matching files found (typecheck)

Check failure on line 11 in version/version.go

View workflow job for this annotation

GitHub Actions / Analyze (go)

pattern version.txt: no matching files found

Check failure on line 11 in version/version.go

View workflow job for this annotation

GitHub Actions / lint

pattern version.txt: no matching files found (typecheck)
var version string

Expand Down

0 comments on commit 1edbd63

Please sign in to comment.