-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (58 loc) · 2.37 KB
/
Makefile
File metadata and controls
67 lines (58 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#
# Copyright 2022-2026 Thorsten A. Knieling
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
GOARCH ?= $(shell $(GO) env GOARCH)
GOOS ?= $(shell $(GO) env GOOS)
GOEXE ?= $(shell $(GO) env GOEXE)
GOBIN ?= $(HOME)/go/bin
PACKAGE = github.com/tknie/services
TESTPKGSDIR = . auth service
DATE ?= $(shell date +%FT%T%z)
VERSION ?= v0.4.0.0
PRODVERSION = $(shell echo $(VERSION)|sed 's/\([[:digit:]]\)\.\([[:digit:]]\)\.\([[:digit:]]\)\.\([[:digit:]]\).*/v\1.\2.\3.\4/g')
BIN = $(CURDIR)/bin/$(GOOS)_$(GOARCH)
PLUGINSBIN = $(BIN)/plugins
BINTOOLS = $(CURDIR)/bin/tools/$(GOOS)_$(GOARCH)
BINTESTS = $(CURDIR)/bin/tests/$(GOOS)_$(GOARCH)
PROMOTE = $(CURDIR)/promote/$(GOOS)_$(GOARCH)
LOGPATH = $(CURDIR)/logs
CURLOGPATH = $(CURDIR)/logs
NETWORK ?= xx:30011
TESTOUTPUT = $(CURDIR)/test
MESSAGES = $(CURDIR)/messages
EXECS = $(BIN)/cmd/service
OBJECTS = *.go auth/*.go service/*.go
ENABLE_DEBUG ?= 0
ARTIFACTORY ?= http://tiger:32000
ARTIFACTORY_PASS ?= admin:1234
PLUGINS = $(PLUGINSBIN)/
export CGO_CFLAGS
export CGO_LDFLAGS
export ENABLE_DEBUG
export LOGPATH
export PORT TLS_PORT HOST TLS_HOST
export TLS_CERTIFICATE TLS_PRIVATE_KEY
include $(CURDIR)/make/common.mk
.PHONY: clean
clean: cleanModules cleanVendor cleanModels cleanCommon ; $(info $(M) cleaning…) @ ## Cleanup everything
@rm -rf restadmin.test jobs.test auth.test
@rm -rf bin pkg logs test promote
@rm -rf test/tests.* test/coverage.*
cleanVendor: ; $(info $(M) cleaning vendor…) @ ## Cleanup vendor
@rm -rf $(CURDIR)/vendor
cleanModels: ; $(info $(M) cleaning models…) @ ## Cleanup models
@rm -rf $(CURDIR)/models $(CURDIR)/client
@rm -rf $(CURDIR)/restapi/[!cng]*
@rm -rf $(CURDIR)/restapi/operations
promote: test-build ; $(info $(M) package for promotion…) @ ## package for promotion
if [ ! -d $(CURDIR)/promote ]; then mkdir $(CURDIR)/promote; fi; \
if [ ! -d $(PROMOTE) ]; then mkdir $(PROMOTE); fi
upload: ; $(info $(M) uploading…) @ ## uploading packages