-
-
Notifications
You must be signed in to change notification settings - Fork 323
/
Copy pathMakefile
171 lines (118 loc) · 3.31 KB
/
Makefile
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
VERSION = $$(git describe --abbrev=0 --tags)
COMMIT_REV = $$(git rev-list -n 1 $(VERSION))
all: build
version:
@echo $(VERSION)
commit_rev:
@echo $(COMMIT_REV)
start:
go run main.go
deps:
GO111MODULE=on go mod vendor
vendor: deps
debug:
DEBUG=1 go run main.go
build:
@go build -o bin/cointop main.go
# http://macappstore.org/upx
build/mac: clean/mac
env GOARCH=amd64 go build -ldflags "-s -w" -o bin/macos/cointop && upx bin/macos/cointop
build/linux: clean/linux
env GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o bin/linux/cointop && upx bin/linux/cointop
build/multiple: clean
env GOARCH=amd64 go build -ldflags "-s -w" -o bin/cointop64 && upx bin/cointop64 && \
env GOARCH=386 go build -ldflags "-s -w" -o bin/cointop32 && upx bin/cointop32
clean/mac:
go clean && \
rm -rf bin/mac
clean/linux:
go clean && \
rm -rf bin/linux
clean:
go clean && \
rm -rf bin/
test:
go test ./...
cointop/test:
go run main.go -test
cointop/version:
go run main.go -version
cointop/clean:
go run main.go -clean
cointop/reset:
go run main.go -reset
snap/clean:
snapcraft clean
rm -f cointop_*.snap
snap/stage:
GO111MODULE=off snapcraft stage
snap/build: snap/clean snap/stage
snapcraft snap
snap/deploy:
snapcraft push cointop_*.snap --release stable
snap/remove:
snap remove cointop
snap/build-and-deploy: snap/build snap/deploy snap/clean
@echo "done"
snap: snap/build-and-deploy
flatpak/build:
flatpak-builder --force-clean build-dir com.github.miguelmota.Cointop.json
flatpak/run/test:
flatpak-builder --run build-dir com.github.miguelmota.Cointop.json cointop
flatpak/repo:
flatpak-builder --repo=repo --force-clean build-dir com.github.miguelmota.Cointop.json
flatpak/add:
flatpak --user remote-add --no-gpg-verify cointop-repo repo
flatpak/remove:
flatpak --user remote-delete cointop-repo
flatpak/install:
flatpak --user install cointop-repo com.github.miguelmota.Cointop
flatpak/run:
flatpak run com.github.miguelmota.Cointop
rpm/install/deps:
sudo dnf install -y rpm-build
sudo dnf install -y dnf-plugins-core
rpm/cp/specs:
cp .rpm/cointop.spec ~/rpmbuild/SPECS/
rpm/build:
rpmbuild -ba ~/rpmbuild/SPECS/cointop.spec
rpm/lint:
rpmlint ~/rpmbuild/SPECS/cointop.spec
rpm/dirs:
chmod -R a+rwx ~/rpmbuild
mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
rpm/download:
wget https://github.com/miguelmota/cointop/archive/$(VERSION).tar.gz -O ~/rpmbuild/SOURCES/$(VERSION).tar.gz
copr/install/cli:
sudo dnf install -y copr-cli
copr/create-project:
copr-cli create cointop --chroot fedora-rawhide-x86_64
copr/build:
copr-cli build cointop ~/rpmbuild/SRPMS/cointop-*.rpm
rm -rf ~/rpmbuild/SRPMS/cointop-*.rpm
copr/deploy: rpm/dirs rpm/cp/specs rpm/download rpm/build copr/build
brew/clean: brew/remove
brew cleanup --force cointop
brew prune
brew/remove:
brew uninstall --force cointop
brew/build: brew/remove
brew install --build-from-source cointop.rb
brew/audit:
brew audit --strict cointop.rb
brew/test:
brew test cointop.rb
brew/tap:
brew tap cointop/cointop https://github.com/miguelmota/cointop
brew/untap:
brew untap cointop/cointop
git/rm/large:
java -jar bfg.jar --strip-blobs-bigger-than 200K .
git/repack:
git reflog expire --expire=now --all
git fsck --full --unreachable
git repack -A -d
git gc --aggressive --prune=now
release:
rm -rf dist
goreleaser