Something went wrong. Try again.
An alternative CLI for git-bug that simplifies working with agents on issues
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
# Build exactly what devenv installs; ./result links to the store path.# Files must be tracked by git to be seen (jj tracks new files for you).build: clean @echo "Building with nix..." @nix build . @./result/bin/bug version.PHONY: build
clean: @# Remove result directory/symlink @rm -rf result @rm -rf bin/.PHONY: clean
fmt: go fmt ./....PHONY: fmt
lint: golangci-lint run.PHONY: lint
test: go test -tags integration -timeout 5m ./....PHONY: test
# Update flake.nix vendorHash when go.mod/go.sum changes# This target depends on go.mod and go.sum, so it will only run when they changeupdate-vendor-hash: flake.nix go.mod go.sum @echo "Checking if vendorHash needs update..." @nix build 2>&1 | tee /tmp/nix-build.log; \ if grep -q "hash mismatch" /tmp/nix-build.log; then \ NEW_HASH=$$(grep "got:" /tmp/nix-build.log | sed 's/.*got: *//' | tail -1); \ echo "Updating vendorHash to $$NEW_HASH"; \ sed -i "s|vendorHash = \"sha256-[^\"]*\";|vendorHash = \"$$NEW_HASH\";|" flake.nix; \ sed -i "s|vendorHash = pkgs.lib.fakeHash;|vendorHash = \"$$NEW_HASH\";|" flake.nix; \ elif grep -q "error:.*fakeHash" /tmp/nix-build.log; then \ NEW_HASH=$$(grep "got:" /tmp/nix-build.log | sed 's/.*got: *//' | tail -1); \ echo "Updating vendorHash to $$NEW_HASH"; \ sed -i "s|vendorHash = pkgs.lib.fakeHash;|vendorHash = \"$$NEW_HASH\";|" flake.nix; \ else \ echo "vendorHash is up to date"; \ fi @rm -f /tmp/nix-build.log @touch update-vendor-hash.PHONY: update-vendor-hash
# Update flake.lock when flake.nix inputs changeupdate-flake-lock: flake.nix nix flake lock touch update-flake-lock.PHONY: update-flake-lock
# Update both vendor hash and flake lockupdate-flake: update-vendor-hash update-flake-lock @echo "Flake updated successfully".PHONY: update-flake