forked from hanc00l/nemo_go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.sh
executable file
·107 lines (97 loc) · 5.8 KB
/
package.sh
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
#!/usr/bin/env bash
echo "package nemo for macos,linux and windows..."
echo "MAKS SURE \"RunMode = Release\" in pkg/conf/config.go"
rm -rf release/*
echo > log/runtime.log
echo > log/access.log
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -trimpath -o server_darwin_amd64 cmd/server/main.go
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -trimpath -o worker_darwin_amd64 cmd/worker/main.go
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -trimpath -o daemon_worker_darwin_amd64 cmd/daemon_worker/main.go
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -trimpath -o server_linux_amd64 cmd/server/main.go
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -trimpath -o worker_linux_amd64 cmd/worker/main.go
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -trimpath -o daemon_worker_linux_amd64 cmd/daemon_worker/main.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -trimpath -o server_windows_amd64.exe cmd/server/main.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -trimpath -o worker_windows_amd64.exe cmd/worker/main.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -trimpath -o daemon_worker_windows_amd64.exe cmd/daemon_worker/main.go
tar -cvzf release/nemo_darwin_amd64.tar \
--exclude=thirdparty/xray/xray_linux_amd64 \
--exclude=thirdparty/xray/xray_windows_amd64.exe \
--exclude=thirdparty/nuclei/nuclei_linux_amd64 \
--exclude=thirdparty/nuclei/nuclei_windows_amd64.exe \
--exclude=thirdparty/fingerprinthub/observer_ward_linux_amd64 \
--exclude=thirdparty/fingerprinthub/observer_ward_windows_amd64.exe \
--exclude=thirdparty/subfinder/subfinder_windows_amd64.exe \
--exclude=thirdparty/subfinder/subfinder_linux_amd64 \
--exclude=thirdparty/httpx/httpx_windows_amd64.exe \
--exclude=thirdparty/httpx/httpx_linux_amd64 \
server_darwin_amd64 worker_darwin_amd64 daemon_worker_darwin_amd64 version.txt \
conf log thirdparty web
tar -cvzf release/nemo_linux_amd64.tar \
--exclude=thirdparty/xray/xray_darwin_amd64 \
--exclude=thirdparty/xray/xray_windows_amd64.exe \
--exclude=thirdparty/nuclei/nuclei_darwin_amd64 \
--exclude=thirdparty/nuclei/nuclei_windows_amd64.exe \
--exclude=thirdparty/fingerprinthub/observer_ward_darwin_amd64 \
--exclude=thirdparty/fingerprinthub/observer_ward_windows_amd64.exe \
--exclude=thirdparty/subfinder/subfinder_windows_amd64.exe \
--exclude=thirdparty/subfinder/subfinder_darwin_amd64 \
--exclude=thirdparty/httpx/httpx_windows_amd64.exe \
--exclude=thirdparty/httpx/httpx_darwin_amd64 \
server_linux_amd64 worker_linux_amd64 daemon_worker_linux_amd64 package_worker.sh version.txt \
conf log thirdparty web docker* Dockerfile*
tar -cvzf release/nemo_windows_amd64.tar \
--exclude=thirdparty/xray/xray_darwin_amd64 \
--exclude=thirdparty/xray/xray_linux_amd64 \
--exclude=thirdparty/nuclei/nuclei_darwin_amd64 \
--exclude=thirdparty/nuclei/nuclei_linux_amd64 \
--exclude=thirdparty/fingerprinthub/observer_ward_darwin_amd64 \
--exclude=thirdparty/fingerprinthub/observer_ward_linux_amd64 \
--exclude=thirdparty/subfinder/subfinder_darwin_amd64 \
--exclude=thirdparty/subfinder/subfinder_linux_amd64 \
--exclude=thirdparty/httpx/httpx_darwin_amd64 \
--exclude=thirdparty/httpx/httpx_linux_amd64 \
server_windows_amd64.exe worker_windows_amd64.exe version.txt \
conf log thirdparty web
tar -cvzf release/worker_linux_amd64.tar \
--exclude=thirdparty/xray/xray_darwin_amd64 \
--exclude=thirdparty/xray/xray_windows_amd64.exe \
--exclude=thirdparty/nuclei/nuclei_darwin_amd64 \
--exclude=thirdparty/nuclei/nuclei_windows_amd64.exe \
--exclude=thirdparty/fingerprinthub/observer_ward_darwin_amd64 \
--exclude=thirdparty/fingerprinthub/observer_ward_windows_amd64.exe \
--exclude=thirdparty/subfinder/subfinder_windows_amd64.exe \
--exclude=thirdparty/subfinder/subfinder_darwin_amd64 \
--exclude=thirdparty/httpx/httpx_windows_amd64.exe \
--exclude=thirdparty/httpx/httpx_darwin_amd64 \
--exclude=conf/app.conf --exclude=server.yml \
worker_linux_amd64 daemon_worker_linux_amd64 conf log thirdparty version.txt
tar -cvzf release/worker_darwin_amd64.tar \
--exclude=thirdparty/xray/xray_linux_amd64 \
--exclude=thirdparty/xray/xray_windows_amd64.exe \
--exclude=thirdparty/nuclei/nuclei_linux_amd64 \
--exclude=thirdparty/nuclei/nuclei_windows_amd64.exe \
--exclude=thirdparty/fingerprinthub/observer_ward_linux_amd64 \
--exclude=thirdparty/fingerprinthub/observer_ward_windows_amd64.exe \
--exclude=thirdparty/subfinder/subfinder_windows_amd64.exe \
--exclude=thirdparty/subfinder/subfinder_linux_amd64 \
--exclude=thirdparty/httpx/httpx_windows_amd64.exe \
--exclude=thirdparty/httpx/httpx_linux_amd64 \
--exclude=conf/app.conf --exclude=server.yml \
worker_darwin_amd64 daemon_worker_darwin_amd64 conf log thirdparty version.txt
tar -cvzf release/worker_windows_amd64.tar \
--exclude=thirdparty/xray/xray_darwin_amd64 \
--exclude=thirdparty/xray/xray_linux_amd64 \
--exclude=thirdparty/nuclei/nuclei_darwin_amd64 \
--exclude=thirdparty/nuclei/nuclei_linux_amd64 \
--exclude=thirdparty/fingerprinthub/observer_ward_darwin_amd64 \
--exclude=thirdparty/fingerprinthub/observer_ward_linux_amd64 \
--exclude=thirdparty/subfinder/subfinder_darwin_amd64 \
--exclude=thirdparty/subfinder/subfinder_linux_amd64 \
--exclude=thirdparty/httpx/httpx_darwin_amd64 \
--exclude=thirdparty/httpx/httpx_linux_amd64 \
--exclude=conf/app.conf --exclude=server.yml \
worker_windows_amd64.exe daemon_worker_windows_amd64.exe conf log thirdparty version.txt
rm -f server_darwin_amd64 worker_darwin_amd64 daemon_worker_darwin_amd64 \
server_linux_amd64 worker_linux_amd64 daemon_worker_linux_amd64 \
server_windows_amd64.exe worker_windows_amd64.exe daemon_worker_windows_amd64.exe \
echo "package done..."