diff --git a/.gitignore b/.gitignore index e894526..a5d8f72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ bin/ -dist/*.tar.gz +dist/ diff --git a/README.md b/README.md index 80081cb..222993a 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,6 @@ See also gt(1) or `gt --help`. ## Screenshots -![trashing screenshot](./dist/Screenshot01.png) +![trashing screenshot](./screenshots/Screenshot01.png) -![list screenshot](./dist/Screenshot02.png) +![list screenshot](./screenshots/Screenshot02.png) diff --git a/justfile b/justfile index a695273..6c3b552 100644 --- a/justfile +++ b/justfile @@ -5,6 +5,12 @@ dist_dir := "dist" cmd := "." output := "." / build_dir / binary dist := "." / dist_dir / binary +contrib_dir := "." / "contrib" +screenshots_dir := "screenshots" +archive_base := dist_dir / binary + "-" + version +linux_archive := archive_base + "-x86_64.tar" +arm64_archive := archive_base + "-arm64.tar" +arm_archive := archive_base + "-arm.tar" # do the thing default: test check install @@ -13,12 +19,24 @@ default: test check install build: go build -o {{output}} {{cmd}} -package: - go build -o {{binary}} - distrobox enter alpine -- go build -o {{binary}}-musl {{cmd}} - tar cafv {{dist_dir}}/{{binary}}-{{version}}-x86_64.tar.gz {{binary}} README.md LICENSE - tar cafv {{dist_dir}}/{{binary}}-{{version}}-x86_64-musl.tar.gz {{binary}}-musl README.md LICENSE - rm {{binary}} {{binary}}-musl +package $CGO_ENABLED="0": man + go build -o {{binary}} {{cmd}} + tar cafv {{linux_archive}} {{binary}} {{binary}}.1 README.md LICENSE {{screenshots_dir}} + tar rafv {{linux_archive}} -C {{contrib_dir}} "completions" + gzip -f {{linux_archive}} + rm {{binary}} + + GOARCH="arm" GOARM="7" go build -o {{binary}} {{cmd}} + tar cafv {{arm_archive}} {{binary}} {{binary}}.1 README.md LICENSE {{screenshots_dir}} + tar rafv {{arm_archive}} -C {{contrib_dir}} "completions" + gzip -f {{arm_archive}} + rm {{binary}} + + GOARCH="arm64" go build -o {{binary}} {{cmd}} + tar cafv {{arm64_archive}} {{binary}} {{binary}}.1 README.md LICENSE {{screenshots_dir}} + tar rafv {{arm64_archive}} -C {{contrib_dir}} "completions" + gzip -f {{arm64_archive}} + rm {{binary}} # run from source run: @@ -44,7 +62,6 @@ install-man: # clean up after yourself clean: -rm {{output}} - -rm {{output}}-musl -rm {{dist_dir}}/*.tar.gz # run go tests diff --git a/dist/Screenshot01.png b/screenshots/Screenshot01.png similarity index 100% rename from dist/Screenshot01.png rename to screenshots/Screenshot01.png diff --git a/dist/Screenshot02.png b/screenshots/Screenshot02.png similarity index 100% rename from dist/Screenshot02.png rename to screenshots/Screenshot02.png