+35
-2
lines changedFilter options
+35
-2
lines changed Original file line number Diff line number Diff line change
@@ -3,3 +3,5 @@ cli/serve/static.rice-box.go
3
3
coverage.txt
4
4
profile.out
5
5
bin
6
+
*.deb
7
+
*.rpm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
1
+
VERSION := $(shell git describe --tags --abbrev=0 | tr -d '[:alpha:]')
2
+
LDFLAGS := "-s -w -X github.com/cloudflare/cfssl/cli/version.version=$(VERSION)"
3
+
1
4
export GOFLAGS := -mod=vendor
2
5
export GOPROXY := off
3
6
@@ -6,7 +9,7 @@ all: bin/cfssl bin/cfssl-bundle bin/cfssl-certinfo bin/cfssl-newkey bin/cfssl-sc
6
9
7
10
bin/%: $(shell find . -type f -name '*.go')
8
11
@mkdir -p $(dir $@)
9
-
go build -o $@ ./cmd/$(@F)
12
+
go build -ldflags $(LDFLAGS) -o $@ ./cmd/$(@F)
10
13
11
14
.PHONY: install
12
15
install: install-cfssl install-cfssl-bundle install-cfssl-certinfo install-cfssl-newkey install-cfssl-scan install-cfssljson install-mkbundle install-multirootca
@@ -29,7 +32,7 @@ bin/goose: $(shell find . -type f -name '*.go')
29
32
30
33
.PHONY: clean
31
34
clean:
32
-
rm -rf bin
35
+
rm -rf bin *.deb *.rpm
33
36
34
37
# Check that given variables are set and all have non-empty values,
35
38
# die with an error otherwise.
@@ -50,3 +53,31 @@ __check_defined = \
50
53
release:
51
54
@:$(call check_defined, GITHUB_TOKEN)
52
55
docker run -e GITHUB_TOKEN=$(GITHUB_TOKEN) --rm -v $(PWD):/workdir -w /workdir cbroglie/goreleaser-cgo:1.12.12 goreleaser --rm-dist
56
+
57
+
BUILD_PATH := $(CURDIR)/build
58
+
INSTALL_PATH := $(BUILD_PATH)/usr/local/bin
59
+
60
+
FPM = fakeroot fpm -C $(BUILD_PATH) \
61
+
-a $(shell uname -m) \
62
+
-s dir \
63
+
-v $(VERSION) \
64
+
--url 'https://github.com/cloudflare/cfssl' \
65
+
--vendor Cloudflare \
66
+
-n cfssl
67
+
68
+
.PHONY: package
69
+
package: package-deb package-rpm
70
+
71
+
.PHONY: package-deb
72
+
package-deb: all
73
+
$(RM) -r build
74
+
mkdir -p $(INSTALL_PATH)
75
+
cp bin/* $(INSTALL_PATH)
76
+
$(FPM) -t deb .
77
+
78
+
.PHONY: package-rpm
79
+
package-rpm: all
80
+
$(RM) -r build
81
+
mkdir -p $(INSTALL_PATH)
82
+
cp bin/* $(INSTALL_PATH)
83
+
$(FPM) -t rpm .
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4