mirror of
https://github.com/Threnklyn/wg-ui.git
synced 2026-06-05 13:20:36 +02:00
Use Go embed.FS instead of external tool to embed assets (#135)
* Use Go embed.FS instead of external tool to embed assets * remove go-bindata from dockerfiles and bump ci to golang 1.16.x * remove more go-bindata related stuff Co-authored-by: Markus Viitamäki <markus.viitamaki@embark-studios.com>
This commit is contained in:
@@ -5,7 +5,7 @@ GOCLEAN=$(GOCMD) clean
|
||||
GOGET=$(GOCMD) get
|
||||
BINARY_NAME=wireguard-ui
|
||||
|
||||
.PHONY: build container ui assets
|
||||
.PHONY: build container ui
|
||||
|
||||
all: build
|
||||
|
||||
@@ -17,27 +17,22 @@ clean:
|
||||
ui:
|
||||
cd ui && npm install && npm run build
|
||||
|
||||
assets:
|
||||
$(GOGET) github.com/go-bindata/go-bindata/...
|
||||
$(GOGET) github.com/elazarl/go-bindata-assetfs/...
|
||||
go-bindata-assetfs -prefix ui/dist ui/dist
|
||||
|
||||
build: ui assets
|
||||
build: ui
|
||||
CGO_ENABLED=0 $(GOBUILD) -o bin/$(BINARY_NAME) -v
|
||||
|
||||
build-amd64: ui assets
|
||||
build-amd64: ui
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOBUILD) -o bin/$(BINARY_NAME)-amd64 -v
|
||||
|
||||
build-armv5: ui assets
|
||||
build-armv5: ui
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=5 $(GOBUILD) -o bin/$(BINARY_NAME)-armv5 -v
|
||||
|
||||
build-armv6: ui assets
|
||||
build-armv6: ui
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 $(GOBUILD) -o bin/$(BINARY_NAME)-armv6 -v
|
||||
|
||||
build-armv7: ui assets
|
||||
build-armv7: ui
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 $(GOBUILD) -o bin/$(BINARY_NAME)-armv7 -v
|
||||
|
||||
build-armv8: ui assets
|
||||
build-armv8: ui
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(GOBUILD) -o bin/$(BINARY_NAME)-armv8 -v
|
||||
|
||||
container:
|
||||
|
||||
Reference in New Issue
Block a user