Skip to content

Commit

Permalink
fix version
Browse files Browse the repository at this point in the history
  • Loading branch information
Scorpio69t committed Nov 21, 2024
1 parent 56646c5 commit a536a68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
MODULE := github.com/Scorpio69t/gcloc
APP_NAME := gcloc
VERSION_FULL := $(shell git describe --tags --always)
VERSION := $(shell echo $(VERSION_FULL) | awk -F'-' '{print $1}')
VERSION := $(shell echo $(VERSION_FULL) | cut -d'-' -f1)
COMMIT := $(shell git rev-parse --short HEAD)
DATE := $(shell date +"%Y-%m-%dT%H:%M:%SZ")

Expand All @@ -12,6 +12,8 @@ DOCKER_REPO := scorpio69t/$(APP_NAME)
LD_FLAGS := -ldflags "-X $(MODULE)/cmd.Version=$(VERSION) -X $(MODULE)/cmd.GitCommit=$(COMMIT) -X $(MODULE)/cmd.BuildDate=$(DATE)"

build: cleanup-package
@echo "Full Version: $(VERSION_FULL)"
@echo "Clean Version: $(VERSION)"
mkdir -p bin
GO111MODULE=on go build $(LD_FLAGS) -o ./bin/gcloc app/gcloc/main.go

Expand Down
3 changes: 0 additions & 3 deletions cmd/version.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/*
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
*/
package cmd

import (
Expand Down

0 comments on commit a536a68

Please sign in to comment.