Skip to content

Commit

Permalink
Rename subctl binary to subctl
Browse files Browse the repository at this point in the history
Currently while building a subctl is binary is named as
`subctl-$version-$arch`. This PR does following changes while creating a
tar of the binary:

1. Rename the binary to just `subctl`. This is one of the requirements
   of Krew.
2. Remove the redundant child directory so that on untar'ing the binary
   is at `subctl-$version-$arch/` path instead of
   `subctl-$version-$arch/subctl-$version`

Epic: submariner-io/enhancements#182

Signed-off-by: Janki Chhatbar <[email protected]>
  • Loading branch information
Jaanki committed Jul 5, 2023
1 parent 9371f08 commit 9b3b5a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ cmd/bin/subctl: cmd/bin/subctl-$(VERSION)-$(GOOS)-$(GOARCH)$(GOEXE)

dist/subctl-%.tar.xz: cmd/bin/subctl-%
mkdir -p dist
tar -cJf $@ --transform "s/^cmd.bin/subctl-$(VERSION)/" $<
tar -cJf $@ --transform "s|^cmd/bin/subctl-[^/]*|subctl|" $<

dist/subctl-%.tar.gz: cmd/bin/subctl-%
mkdir -p dist
tar -czf $@ --transform "s/^cmd.bin/subctl-$(VERSION)/" $<
tar -czf $@ --transform "s|^cmd/bin/subctl-[^/]*|subctl|" $<

dist/subctl-checksums.txt: $(CROSS_TARBALLS)
cd $(@D) && sha256sum $(^F) >> $(@F)
Expand Down

0 comments on commit 9b3b5a1

Please sign in to comment.