From e966119bd40ff2a872f40b80493f7ce3fc36c02c Mon Sep 17 00:00:00 2001 From: Bhunter <180028024+bhunter234@users.noreply.github.com> Date: Sat, 11 Jan 2025 18:20:36 +0100 Subject: [PATCH] chore(build): update Makefile --- Makefile | 11 ++++++++--- go.mod | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 0520cae..8cc870c 100644 --- a/Makefile +++ b/Makefile @@ -17,9 +17,16 @@ GOOS ?= $(shell go env GOOS) GOARCH ?= $(shell go env GOARCH) GIT_COMMIT := $(shell git rev-parse --short HEAD) VERSION_PACKAGE := $(MODULE_PATH)/internal/version -VERSION := $(GIT_TAG) BINARY_EXTENSION := +ifeq ($(IS_WINDOWS),true) + TAG_FILTER:=Sort-Object -Descending | Select-Object -First 1 +else + TAG_FILTER:=head -n 1 +endif + +GIT_TAG := $(shell git tag -l '[0-9]*.[0-9]*.[0-9]*' --sort=-v:refname | $(TAG_FILTER)) + ifeq ($(IS_WINDOWS),true) BINARY_EXTENSION := .exe RM := powershell -Command "Remove-Item" @@ -27,14 +34,12 @@ ifeq ($(IS_WINDOWS),true) MKDIR := powershell -Command "New-Item -ItemType Directory -Force" DOWNLOAD := powershell -Command "Invoke-WebRequest -Uri" UNZIP := powershell -Command "Expand-Archive" - GIT_TAG := $(shell git tag -l '[0-9]*.[0-9]*.[0-9]*' --sort=-v:refname | Sort-Object -Descending | Select-Object -First 1) else RM := rm -f RMDIR := rm -rf MKDIR := mkdir -p DOWNLOAD := curl -sLO UNZIP := unzip -q -d - GIT_TAG := $(shell git tag -l '[0-9]*.[0-9]*.[0-9]*' --sort=-v:refname | head -n 1) endif .PHONY: all build run clean frontend backend run sync-ui retag patch-version minor-version major-version gen check-semver install-semver diff --git a/go.mod b/go.mod index 92cd1f8..4b24f23 100644 --- a/go.mod +++ b/go.mod @@ -9,6 +9,7 @@ require ( github.com/go-chi/cors v1.2.1 github.com/go-co-op/gocron v1.37.0 github.com/golang-jwt/jwt/v5 v5.2.1 + github.com/google/uuid v1.6.0 github.com/gotd/contrib v0.21.0 github.com/gotd/td v0.116.0 github.com/iyear/connectproxy v0.1.1 @@ -41,7 +42,6 @@ require ( github.com/ghodss/yaml v1.0.0 // indirect github.com/go-faster/yaml v0.4.6 // indirect github.com/go-sql-driver/mysql v1.8.1 // indirect - github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackc/puddle/v2 v2.2.2 // indirect