update justfile package command
- include screenshots (moved to their own dir), completions - build for x86_64, arm, and arm64
This commit is contained in:
parent
d4f086ab54
commit
747a24ebd6
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +1,2 @@
|
|||
bin/
|
||||
dist/*.tar.gz
|
||||
dist/
|
||||
|
|
|
@ -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)
|
||||
|
|
31
justfile
31
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
|
||||
|
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 324 KiB After Width: | Height: | Size: 324 KiB |
Loading…
Reference in a new issue