|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
ROOT := $(shell git rev-parse --show-toplevel)
|
|
|
|
|
ROOT := $(shell git rev-parse --show-toplevel)/gallery
|
|
|
|
|
FLUTTER := $(shell which flutter)
|
|
|
|
|
FLUTTER_BIN_DIR := $(shell dirname $(FLUTTER))
|
|
|
|
|
FLUTTER_DIR := $(FLUTTER_BIN_DIR:/bin=)
|
|
|
|
@ -16,29 +16,6 @@ format:
|
|
|
|
|
test:
|
|
|
|
|
$(FLUTTER) test
|
|
|
|
|
|
|
|
|
|
.PHONY: build-web
|
|
|
|
|
build-web:
|
|
|
|
|
$(FLUTTER) build web
|
|
|
|
|
|
|
|
|
|
.PHONY: fetch-master
|
|
|
|
|
fetch-master:
|
|
|
|
|
$(shell git fetch origin master)
|
|
|
|
|
|
|
|
|
|
.PHONY: master-branch-check
|
|
|
|
|
master-branch-check: fetch-master
|
|
|
|
|
ifneq ($(shell git rev-parse --abbrev-ref HEAD),master)
|
|
|
|
|
$(error Not on master branch, please checkout master)
|
|
|
|
|
endif
|
|
|
|
|
ifneq ($(shell git rev-parse HEAD),$(shell git rev-parse origin/master))
|
|
|
|
|
$(error Your master branch is not up to date with origin/master, please pull before deploying)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: deploy
|
|
|
|
|
deploy: master-branch-check build-web
|
|
|
|
|
cp $(ROOT)/gallery/web/favicon.ico $(ROOT)/gallery/build/web/
|
|
|
|
|
firebase deploy
|
|
|
|
|
|
|
|
|
|
.PHONY: gen-l10n
|
|
|
|
|
gen-l10n:
|
|
|
|
|
$(DART) $(FLUTTER_DIR)/dev/tools/localization/bin/gen_l10n.dart \
|
|
|
|
|