From 45220cc2793915008ae7b41f6f533ae86f1c56c3 Mon Sep 17 00:00:00 2001 From: Max Resnick Date: Wed, 26 Mar 2025 22:17:47 -0700 Subject: fix: remove debug output, update run command to do args --- justfile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'justfile') diff --git a/justfile b/justfile index 5b95c74..fe2b0b0 100644 --- a/justfile +++ b/justfile @@ -1,4 +1,5 @@ TEMPDIR := `mktemp -d` +TEMPFILE := `mktemp` BUILDDIR := "_build" ALL_VERSIONS := BUILDDIR / "ALL_VERSIONS" @@ -13,7 +14,7 @@ default: docker-build part="latest": (new-ver part) #!/usr/bin/env bash - set -euxo pipefail + set -euo pipefail new_ver=$(cat {{ NEW_VERSION }}); \ docker build --build-arg="version=$new_ver" -t unbound-ads:$new_ver . @@ -26,7 +27,7 @@ clean: new-ver part="latest": builddir #!/usr/bin/env bash - set -euxo pipefail + set -euo pipefail echo {{part}} echo "{{ TAGS }}" > {{ ALL_VERSIONS }} cat {{ ALL_VERSIONS }} | bumpver --last-version patch - > {{ CURRENT_VERSION }} @@ -45,7 +46,7 @@ git-push tag: git-build-release: #!/usr/bin/env bash - set -euxo pipefail + set -euo pipefail new_ver=$(cat {{ NEW_VERSION }}) current_ver=$(cat {{ CURRENT_VERSION}}) # temp light weight tag for building release notes @@ -64,7 +65,7 @@ git-tag-release: git-tag-clean: #!/usr/bin/env bash - set -euxo pipefail + set -euo pipefail for tag in $(git tag -l "*-latest.*.*"); do git tag -d $tag; @@ -89,7 +90,7 @@ push: docker-push registry="public.ecr.aws/s0f9o2k5": #!/usr/bin/env bash - set -euxo pipefail + set -euo pipefail new_ver=$(cat {{ NEW_VERSION }}) docker tag unbound-ads:$new_ver {{registry}}/unbound-ads:$new_ver docker push {{registry}}/unbound-ads:$new_ver @@ -99,8 +100,9 @@ docker-push registry="public.ecr.aws/s0f9o2k5": docker push {{registry}}/unbound-ads:latest fi -run repo=(TEMPDIR): - go run main.go +run url="https://v.firebog.net/hosts/lists.php?type=tick" output=(TEMPFILE): + go run main.go {{url}} {{output}} + echo "{{output}}" test: golangci-lint run -- cgit v1.2.3