about summary refs log tree commit diff
path: root/users/fcuny/notes
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2021-09-09 18:03:00 -0700
committerFranck Cuny <franck@fcuny.net>2021-09-09 18:09:13 -0700
commite87223deb3b5508d49b5712215a92d1fa50c362b (patch)
tree27af707c114c09aaa43a0ab2565093a8e988e8d6 /users/fcuny/notes
parentblog: update elisp for git/sourcegraph (diff)
downloadworld-e87223deb3b5508d49b5712215a92d1fa50c362b.tar.gz
build: get the proper version for tagging
We were evaluating the version of the app when the rule was evaluated,
while we need to get the version after we run `flyctl deploy`.

Since we're tagging a release, let's also annotate the tag.

Remove the `--build-arg` argument to `flyct deploy` since it's being
ignored (same with `docker build`).

Closes #1.
Diffstat (limited to 'users/fcuny/notes')
-rw-r--r--users/fcuny/notes/Makefile7
1 files changed, 2 insertions, 5 deletions
diff --git a/users/fcuny/notes/Makefile b/users/fcuny/notes/Makefile
index d602b52..b117922 100644
--- a/users/fcuny/notes/Makefile
+++ b/users/fcuny/notes/Makefile
@@ -17,16 +17,13 @@ worktree-clean:
 
 deploy: worktree-clean docker-build
 	@echo "Deploying to fly ..."
-	flyctl deploy \
-		--build-arg IMAGE_REF=$(DOCKER_IMAGE_REF)
-	@sleep 5
-	git tag --message $(shell flyctl info -j |jq '.App | "\(.Name)/v\(.Version)"') $(shell flyctl info -j |jq '.App | "\(.Name)/v\(.Version)"')
+	flyctl deploy
+	@git tag -a --message $$(flyctl info -j |jq -r '.App | "fcuny.net/v\(.Version)"') $$(flyctl info -j |jq -r '.App | "fcuny.net/v\(.Version)"')
 
 docker-build:
 	@echo "Building Docker image ..."
 	$(DOCKER) build $(DOCKER_BUILD_ARGS) \
 		--tag "${DOCKER_IMAGE}:${DOCKER_IMAGE_REF}" \
-	  --build-arg IMAGE_REF=$(DOCKER_IMAGE_REF) \
 		--file "$(DOCKERFILE)" \
 		"$(PROJECT_DIR)"