about summary refs log tree commit diff stats
path: root/justfile
diff options
context:
space:
mode:
Diffstat (limited to 'justfile')
-rwxr-xr-xjustfile33
1 files changed, 19 insertions, 14 deletions
diff --git a/justfile b/justfile
index 2fd26ab..bf20fbf 100755
--- a/justfile
+++ b/justfile
@@ -3,19 +3,24 @@
 fly-system := "x86_64-linux"
 fly-registry := "registry.fly.io/alanpearce-eu"
 docker-tag := env_var_or_default("DOCKER_TAG", `date +%Y%m%d%H%M%S` + "-" + `git rev-parse --short HEAD`)
-version := `sentry-cli releases propose-version`
 environment := "production"
 started-at := `date +%s`
 
 default:
     @just --list --justfile {{ justfile() }} --unsorted
 
+clean:
+	rm -r website
+
 check:
     nix flake check . --print-build-logs
 
 check-licenses:
     nix run nixpkgs#go-licenses check ./...
 
+check-links:
+	hyperlink website/public
+
 update-all:
     go get -u all
     gomod2nix --outdir nix
@@ -26,8 +31,8 @@ watch-flake command:
 
 watch-builder: (watch-flake "watchexec -w cmd/build -w content -w templates -r go run ./cmd/build --base-url http://localhost:3000")
 
-generate:
-    go run ./cmd/build --base-url http://localhost:3000
+build:
+    go run ./cmd/build
 
 nix-build what:
     nix build .#{{ what }}
@@ -62,21 +67,21 @@ docker-inspect image-path="result":
 print-docker-tag:
     @echo {{ fly-registry }}:{{ docker-tag }}
 
-stream-to-registry : sentry-create-release && sentry-finalise-release
+stream-to-registry :
     just docker-stream-fly | gzip --fast | skopeo copy --dest-precompute-digests docker-archive:/dev/stdin docker://{{ fly-registry }}:{{ docker-tag }}
 
-push-to-registry: sentry-create-release && sentry-finalise-release
+push-to-registry:
     skopeo copy --dest-precompute-digests docker-archive://`readlink -f result`  docker://{{ fly-registry }}:{{ docker-tag }}
 
-sentry-create-release:
-    sentry-cli releases new {{ version }}
+deploy-fly registry-and-tag=(fly-registry + ":" + docker-tag):
+    fly deploy --image {{ registry-and-tag }}
 
-sentry-finalise-release:
-    sentry-cli releases set-commits {{ version }} --ignore-missing --auto # will not work in CI
-    sentry-cli releases finalize {{ version }}
+deploy-vercel-preview: clean build
+	vercel pull --environment=preview
+	vercel deploy
 
-sentry-create-deploy:
-    sentry-cli releases deploys {{ version }} new --started {{ started-at }} --finished `date +%s` --env {{ environment }}
+deploy-vercel: clean build check-links
+	vercel pull --environment=production
+	vercel deploy --prod
 
-deploy registry-and-tag=(fly-registry + ":" + docker-tag): && sentry-create-deploy
-    fly deploy --image {{ registry-and-tag }}
+deploy-production: deploy-vercel