mirror of
https://github.com/RustyRaptor/GopherTube.git
synced 2026-12-03 15:15:18 -07:00
build: always inject latest git tag as version (Makefile, build.sh)
This commit is contained in:
1 parent
32f6d00dc2
commit
949a525f92
2 files changed
+12
-3
No files matched your search
@@ -1,9 +1,11 @@
|
||||
.PHONY: install
|
||||
.PHONY: install build
|
||||
|
||||
VERSION := $(shell git describe --tags --abbrev=0 2>/dev/null || echo "dev")
|
||||
|
||||
# Install GopherTube (build, install binary, install man page, create config)
|
||||
install:
|
||||
go mod tidy
|
||||
go build -o gophertube main.go
|
||||
go build -ldflags "-X main.version=$(VERSION)" -o gophertube main.go
|
||||
sudo cp gophertube /usr/local/bin/
|
||||
sudo mkdir -p /usr/local/share/man/man1
|
||||
sudo cp man/gophertube.1 /usr/local/share/man/man1/
|
||||
@@ -12,6 +14,9 @@ install:
|
||||
cp config/gophertube.yaml.example ~/.config/gophertube/gophertube.yaml
|
||||
@echo "GopherTube installed successfully!"
|
||||
@echo "Configuration file created at ~/.config/gophertube/gophertube.yaml"
|
||||
@echo "Run 'gophertube --help' to get started."
|
||||
@echo "Run 'gophertube --help' to get started."
|
||||
|
||||
build:
|
||||
go build -ldflags "-X main.version=$(VERSION)" -o gophertube main.go
|
||||
|
||||
|
||||
Reference in new issue
Block a user