|
@@ -1,4 +1,6 @@
|
|
|
-SHA := $(shell git rev-parse HEAD)
|
|
|
|
|
|
|
+ifndef SHA
|
|
|
|
|
+ SHA := $(shell git rev-parse HEAD)
|
|
|
|
|
+endif
|
|
|
|
|
|
|
|
ASSETS := \
|
|
ASSETS := \
|
|
|
internal/ui/assets/edit/index.html \
|
|
internal/ui/assets/edit/index.html \
|
|
@@ -21,7 +23,7 @@ node_modules/.build: package.json
|
|
|
internal/ui/assets/edit/index.html: node_modules/.build $(shell find ui -type f)
|
|
internal/ui/assets/edit/index.html: node_modules/.build $(shell find ui -type f)
|
|
|
npm run build
|
|
npm run build
|
|
|
|
|
|
|
|
-internal/ui/assets/links/index.html: node_modules/.build $(shell find ui -type f)
|
|
|
|
|
|
|
+internal/ui/assets/index.html: node_modules/.build $(shell find ui -type f)
|
|
|
npm run build
|
|
npm run build
|
|
|
|
|
|
|
|
develop: bin/devserver bin/go
|
|
develop: bin/devserver bin/go
|
|
@@ -29,3 +31,12 @@ develop: bin/devserver bin/go
|
|
|
|
|
|
|
|
clean:
|
|
clean:
|
|
|
rm -rf bin internal/ui/assets
|
|
rm -rf bin internal/ui/assets
|
|
|
|
|
+
|
|
|
|
|
+bin/buildimg:
|
|
|
|
|
+ GOBIN="$(CURDIR)/bin" go install github.com/kellegous/buildimg@latest
|
|
|
|
|
+
|
|
|
|
|
+publish: bin/buildimg
|
|
|
|
|
+ bin/buildimg --tag=$(shell git rev-parse --short $(SHA)) \
|
|
|
|
|
+ --push \
|
|
|
|
|
+ --target=linux/arm64 --target=linux/amd64 \
|
|
|
|
|
+ --build-arg=SHA=${SHA} kellegous/go
|