Skip to content

Commit

Permalink
update upx
Browse files Browse the repository at this point in the history
  • Loading branch information
cxjava committed Nov 14, 2019
1 parent 4ce422d commit 27ab82b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ builds:
- goos: darwin
goarch: arm
hooks:
post: ./upx.sh
post: ./upx.sh {{.ProjectName}}
archives:
- id: binary
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
Expand Down
4 changes: 2 additions & 2 deletions upx.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

set -euo pipefail

find dist/ -type f -iname 'gosuv*' | xargs -I{} -n1 -P 4 upx --best "{}"
binaryName="$1"
find dist/ -type f -iname "${binaryName}*" | xargs -I{} -n1 -P 4 upx --best "{}"

0 comments on commit 27ab82b

Please sign in to comment.