upd: makefile updated
This commit is contained in:
parent
690fe2f603
commit
89833c9025
74
Makefile
74
Makefile
@ -46,7 +46,7 @@ TARGET_FILE_TYPE=\
|
||||
-o -name "*.yml"
|
||||
|
||||
# Go Module Placeholder
|
||||
# Replacement rules applied by upd-go-mod. Valid sed replacement expressions.
|
||||
# Replacement rules applied by upd-gm-ph. Valid sed replacement expressions.
|
||||
GO_MODULE_REPLACEMENT=\
|
||||
-e 's|gomodule|$(GO_MODULE)|g' \
|
||||
-e 's|go/module|$(GO_MODULE)|g' \
|
||||
@ -60,10 +60,10 @@ GO_MODULE_REPLACEMENT=\
|
||||
# PHONY Target
|
||||
.PHONY: \
|
||||
help \
|
||||
upd-gm-ph \
|
||||
upd-fw-md \
|
||||
upd-sw-md \
|
||||
go-ini \
|
||||
upd-go-mod \
|
||||
upd-fw-imd \
|
||||
upd-sw-imd \
|
||||
go-tid \
|
||||
go-stp \
|
||||
pre-rel \
|
||||
@ -87,48 +87,36 @@ GO_MODULE_REPLACEMENT=\
|
||||
|
||||
help:
|
||||
@echo ""
|
||||
@echo "Available Command:"
|
||||
@echo "Available Commands:"
|
||||
@echo ""
|
||||
@echo " make go-stp Initialize Go module and tidy dependencies"
|
||||
@printf " %-18s %s\n" "upd-gm-ph" "Update Go module placeholder"
|
||||
@printf " %-18s %s\n" "upd-fw-md" "Update framework metadata"
|
||||
@printf " %-18s %s\n" "upd-sw-md" "Update software metadata"
|
||||
@echo ""
|
||||
@echo " make upd-go-mod Update Go module placeholders"
|
||||
@echo " make upd-fw-imd Update framework metadata"
|
||||
@echo " make upd-sw-imd Update software metadata"
|
||||
@printf " %-18s %s\n" "go-ini" "Initialize Go module"
|
||||
@printf " %-18s %s\n" "go-tid" "Tidy Go module dependencies"
|
||||
@printf " %-18s %s\n" "go-stp" "Initialize Go module and tidy dependencies"
|
||||
@echo ""
|
||||
@echo " make go-bld Build all platform binaries"
|
||||
@echo " make go-bld-lin Build all Linux binaries"
|
||||
@echo " make go-bld-win Build all Windows binaries"
|
||||
@echo " make go-bld-mac Build all macOS binaries"
|
||||
@printf " %-18s %s\n" "go-bld" "Build all platform binaries"
|
||||
@printf " %-18s %s\n" "go-bld-lin" "Build all Linux binaries"
|
||||
@printf " %-18s %s\n" "go-bld-win" "Build all Windows binaries"
|
||||
@printf " %-18s %s\n" "go-bld-mac" "Build all macOS binaries"
|
||||
@echo ""
|
||||
@echo " make bld-lin-amd Build Linux AMD64 binary"
|
||||
@echo " make bld-lin-arm Build Linux ARM64 binary"
|
||||
@printf " %-18s %s\n" "bld-lin-amd" "Build Linux AMD64 binary"
|
||||
@printf " %-18s %s\n" "bld-lin-arm" "Build Linux ARM64 binary"
|
||||
@echo ""
|
||||
@echo " make bld-win-amd Build Windows AMD64 binary"
|
||||
@echo " make bld-win-arm Build Windows ARM64 binary"
|
||||
@printf " %-18s %s\n" "bld-win-amd" "Build Windows AMD64 binary"
|
||||
@printf " %-18s %s\n" "bld-win-arm" "Build Windows ARM64 binary"
|
||||
@echo ""
|
||||
@echo " make bld-mac-amd Build macOS AMD64 binary"
|
||||
@echo " make bld-mac-arm Build macOS ARM64 binary"
|
||||
@printf " %-18s %s\n" "bld-mac-amd" "Build macOS AMD64 binary"
|
||||
@printf " %-18s %s\n" "bld-mac-arm" "Build macOS ARM64 binary"
|
||||
@echo ""
|
||||
|
||||
# =========================================================
|
||||
# Initialize
|
||||
# =========================================================
|
||||
|
||||
go-ini:
|
||||
@test -f go.mod || go mod init $(GO_MODULE)
|
||||
|
||||
go-tid:
|
||||
go mod tidy
|
||||
|
||||
go-stp: \
|
||||
go-ini \
|
||||
go-tid
|
||||
|
||||
# =========================================================
|
||||
# Update
|
||||
# =========================================================
|
||||
|
||||
upd-go-mod:
|
||||
upd-gm-ph:
|
||||
|
||||
@find . -type f \
|
||||
\( $(TARGET_FILE_TYPE) \) \
|
||||
@ -146,7 +134,7 @@ upd-go-mod:
|
||||
|
||||
@echo "Go Module Updated!"
|
||||
|
||||
upd-fw-imd:
|
||||
upd-fw-md:
|
||||
|
||||
@jq \
|
||||
--arg framework_regular "$(FRAMEWORK_REGULAR)" \
|
||||
@ -161,7 +149,7 @@ upd-fw-imd:
|
||||
|
||||
@echo "Framework Metadata Updated!"
|
||||
|
||||
upd-sw-imd:
|
||||
upd-sw-md:
|
||||
|
||||
@jq \
|
||||
--arg software_regular "$(SOFTWARE_REGULAR)" \
|
||||
@ -185,6 +173,20 @@ pre-rel:
|
||||
@mkdir -p "$(RELEASE_DIR)"
|
||||
@find "$(RELEASE_DIR)" -mindepth 1 -delete
|
||||
|
||||
# =========================================================
|
||||
# Initialize
|
||||
# =========================================================
|
||||
|
||||
go-ini:
|
||||
@test -f go.mod || go mod init $(GO_MODULE)
|
||||
|
||||
go-tid:
|
||||
go mod tidy
|
||||
|
||||
go-stp: \
|
||||
go-ini \
|
||||
go-tid
|
||||
|
||||
# =========================================================
|
||||
# Build Group
|
||||
# =========================================================
|
||||
|
||||
Loading…
Reference in New Issue
Block a user