Files
hello_gitea/makefile
Anton Kuznetcov 1a0207017a
Some checks failed
Release Build / create-docker-image (push) Successful in 3m30s
Release Build / create-release (push) Failing after 0s
Release v1.0.25
2025-07-28 10:16:51 +06:00

28 lines
655 B
Makefile

.PHONY: build clean test release
BIN_DIR=bin
APP_NAME=hello-api
VERSION=1.0.0
build:
mkdir -p $(BIN_DIR)
go build -o $(BIN_DIR)/$(APP_NAME)-$(VERSION) main.go
clean:
rm -rf $(BIN_DIR)
test:
go test -v ./...
# Задача для создания релиза
# Использование: make release VERSION=1.0.25
release:
@if [ -z "$(VERSION)" ]; then \
echo "Ошибка: Необходимо указать версию в формате v1.0.25"; \
echo "Использование: make release VERSION=1.0.25"; \
exit 1; \
fi
@./scripts/release-interactive.sh $(VERSION)
release-interactive:
@./scripts/release-interactive.sh