Files
pmg/Makefile
Kunal SinghandGitHub cd8fb52c47 feat: new pmg banner (#68)
* feat: new pmg banner

* commit lenght check
2025-08-21 23:01:30 +05:30

26 lines
541 B
Makefile

GO := go
BIN_DIR := bin
BIN := $(BIN_DIR)/pmg
SHELL := /bin/bash
GITCOMMIT := $(shell git rev-parse HEAD)
VERSION := "$(shell git describe --tags --abbrev=0)-$(shell git rev-parse --short HEAD)"
GO_CFLAGS=-X 'github.com/safedep/pmg/internal/version.Commit=$(GITCOMMIT)' -X 'github.com/safedep/pmg/internal/version.Version=$(VERSION)'
GO_LDFLAGS=-ldflags "-w $(GO_CFLAGS)"
.PHONY: all
all: pmg
pmg: create_bin
$(GO) build ${GO_LDFLAGS} -o $(BIN) main.go
create_bin:
mkdir -p $(BIN_DIR)
clean:
rm -rf $(BIN_DIR)
test:
go test ./...