mirror of
https://github.com/tgdrive/teldrive.git
synced 2025-02-22 22:13:25 +08:00
chore(build): update Makefile
This commit is contained in:
parent
381ea31fc1
commit
e966119bd4
2 changed files with 9 additions and 4 deletions
11
Makefile
11
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
|
||||
|
|
2
go.mod
2
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
|
||||
|
|
Loading…
Reference in a new issue