Files
I2pbrowser/Makefile

134 lines
3.7 KiB
Makefile
Raw Normal View History

2020-04-02 17:52:46 -04:00
2020-04-03 19:55:17 -04:00
export GO111MODULE=on
GO111MODULE=on
2020-04-03 19:53:12 -04:00
BIN_NAME=i2pbrowser
2020-08-21 15:14:02 -04:00
EXT_VERSION=0.73
2020-04-03 13:43:33 -04:00
SNOW_VERSION=0.2.2
2020-04-03 18:56:34 -04:00
UMAT_VERSION=1.25.2
UBLO_VERSION=1.4.0
2020-04-07 22:21:26 -04:00
NOSS_VERSION=11.0.23
2020-08-23 00:54:33 -04:00
ZERO_VERSION=v1.17
2020-08-21 15:14:02 -04:00
ZERO_VERSION_B=`echo $(ZERO_VERSION) | tr -d 'v.'`
2020-08-23 23:26:14 -04:00
LAST_VERSION=$(ZERO_VERSION_B).$(EXT_VERSION).097
LAUNCH_VERSION=$(ZERO_VERSION_B).$(EXT_VERSION).098
2020-04-02 17:52:46 -04:00
2020-05-17 17:45:50 -04:00
GO_COMPILER_OPTS = -a -tags netgo -ldflags '-w -extldflags "-static"'
2020-08-21 15:14:02 -04:00
echo:
echo $(LAUNCH_VERSION)
2020-08-01 14:15:43 -04:00
build:
2020-05-17 17:45:50 -04:00
go build $(GO_COMPILER_OPTS)
2020-04-03 11:38:32 -04:00
2020-08-04 00:31:08 -04:00
assets: fmt lib/assets.go
2020-04-03 18:56:34 -04:00
2020-07-02 19:58:19 -04:00
gen:
go run $(GO_COMPILER_OPTS) -tags generate gen.go extensions.go
2020-04-02 17:52:46 -04:00
clean: fmt
2020-09-09 21:17:43 -04:00
rm -f $(BIN_NAME)*
fmt:
gofmt -w -s *.go
2020-08-04 00:31:08 -04:00
gofmt -w -s \
2020-08-04 00:31:35 -04:00
lib/firefox.go \
lib/pure.go \
lib/pureextensions.go \
lib/variant.go \
2020-08-04 00:31:08 -04:00
lib/variantextensions.go
2020-07-02 19:58:19 -04:00
sum:
2020-04-03 15:38:36 -04:00
sha256sum ifox/i2ppb@eyedeekay.github.io.xpi
sha256sum 'ifox/{b11bea1f-a888-4332-8d8a-cec2be7d24b9}.xpi'
sha256sum ifox/uBlock0@raymondhill.net.xpi
sha256sum ifox/uMatrix@raymondhill.net.xpi
2020-07-02 19:58:19 -04:00
#sha256sum 'ifox/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi'
2020-04-03 13:43:33 -04:00
2020-04-07 20:16:41 -04:00
all: pure variant
2020-08-04 00:31:08 -04:00
pure: fmt lib/assets.go windows osx linux
2020-08-01 14:15:43 -04:00
windows: fmt
2020-09-09 21:17:43 -04:00
GOOS=windows go build $(GO_COMPILER_OPTS) -o $(BIN_NAME).exe
2020-08-01 14:15:43 -04:00
osx: fmt
2020-09-09 21:17:43 -04:00
GOOS=darwin go build $(GO_COMPILER_OPTS) -o $(BIN_NAME)-darwin
2020-08-01 14:15:43 -04:00
linux: fmt
2020-09-09 21:17:43 -04:00
GOOS=linux go build $(GO_COMPILER_OPTS) -o $(BIN_NAME)
2020-04-02 17:52:46 -04:00
2020-08-04 01:48:09 -04:00
variant: fmt lib/assets.go vwindows vosx vlinux
2020-08-01 14:15:43 -04:00
vwindows: fmt
2020-09-09 21:17:43 -04:00
GOOS=windows go build $(GO_COMPILER_OPTS) -tags variant -o $(BIN_NAME)-variant.exe
2020-08-01 14:15:43 -04:00
vosx: fmt
2020-09-09 21:17:43 -04:00
GOOS=darwin go build $(GO_COMPILER_OPTS) -tags variant -o $(BIN_NAME)-variant-darwin
2020-08-01 14:15:43 -04:00
vlinux: fmt
2020-09-09 21:17:43 -04:00
GOOS=linux go build $(GO_COMPILER_OPTS) -tags variant -o $(BIN_NAME)-variant
2020-04-07 20:16:41 -04:00
2020-09-09 21:17:43 -04:00
sumwindows=`sha256sum $(BIN_NAME).exe`
sumlinux=`sha256sum $(BIN_NAME)`
sumdarwin=`sha256sum $(BIN_NAME)-darwin`
sumvwindows=`sha256sum $(BIN_NAME)-variant.exe`
sumvlinux=`sha256sum $(BIN_NAME)-variant`
sumvdarwin=`sha256sum $(BIN_NAME)-variant-darwin`
check:
echo "$(sumwindows)"
echo "$(sumlinux)"
echo "$(sumdarwin)"
echo "$(sumvwindows)"
echo "$(sumvlinux)"
echo "$(sumvdarwin)"
2020-04-03 11:38:32 -04:00
release:
2020-09-09 21:17:43 -04:00
gothub release -p -u eyedeekay -r "$(BIN_NAME)" -t $(LAUNCH_VERSION) -n "Launchers" -d "A self-configuring launcher for mixed I2P and clearnet Browsing with Firefox"
2020-08-21 15:27:05 -04:00
sed -i "s|$(LAST_VERSION)|$(LAUNCH_VERSION)|g" README.md
sed -i "s|$(LAST_VERSION)|$(LAUNCH_VERSION)|g" Makefile
git commit -am "Make release version $(LAUNCH_VERSION)" && git push
2020-04-02 17:52:46 -04:00
2020-08-21 23:33:32 -04:00
upload: upload-windows upload-darwin upload-linux
upload-windows:
2020-09-09 21:17:43 -04:00
gothub upload -R -u eyedeekay -r "$(BIN_NAME)" -t $(LAUNCH_VERSION) -l "$(sumwindows)" -n "$(BIN_NAME).exe" -f "$(BIN_NAME).exe"
2020-08-21 23:33:32 -04:00
upload-darwin:
2020-09-09 21:17:43 -04:00
gothub upload -R -u eyedeekay -r "$(BIN_NAME)" -t $(LAUNCH_VERSION) -l "$(sumdarwin)" -n "$(BIN_NAME)-darwin" -f "$(BIN_NAME)-darwin"
2020-08-21 23:33:32 -04:00
upload-linux:
2020-09-09 21:17:43 -04:00
gothub upload -R -u eyedeekay -r "$(BIN_NAME)" -t $(LAUNCH_VERSION) -l "$(sumlinux)" -n "$(BIN_NAME)" -f "$(BIN_NAME)"
2020-08-21 23:33:32 -04:00
upload-variant: upload-variant-windows upload-variant-darwin upload-variant-linux
upload-variant-windows:
2020-09-09 21:17:43 -04:00
gothub upload -R -u eyedeekay -r "$(BIN_NAME)" -t $(LAUNCH_VERSION) -l "$(sumvwindows)" -n "$(BIN_NAME)-variant.exe" -f "$(BIN_NAME)-variant.exe"
2020-08-21 23:33:32 -04:00
upload-variant-darwin:
2020-09-09 21:17:43 -04:00
gothub upload -R -u eyedeekay -r "$(BIN_NAME)" -t $(LAUNCH_VERSION) -l "$(sumvdarwin)" -n "$(BIN_NAME)-variant-darwin" -f "$(BIN_NAME)-variant-darwin"
2020-08-21 23:33:32 -04:00
upload-variant-linux:
2020-09-09 21:17:43 -04:00
gothub upload -R -u eyedeekay -r "$(BIN_NAME)" -t $(LAUNCH_VERSION) -l "$(sumvlinux)" -n "$(BIN_NAME)-variant" -f "$(BIN_NAME)-variant"
upload-all: upload upload-variant
release-all: release upload-all
release-pure:
make release; true
2020-08-22 02:23:26 -04:00
make linux upload-linux
make windows upload-windows
make osx upload-darwin
2020-04-07 20:16:41 -04:00
release-variant:
make release; true
2020-08-22 02:23:26 -04:00
make vlinux upload-variant-linux
make vwindows upload-variant-windows
make vosx upload-variant-darwin
2020-08-02 18:21:36 -04:00
clean-release: clean release-pure release-variant
2020-08-02 18:21:36 -04:00