Skip to content

Commit

Permalink
fix tar packaging (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
tashima42 authored Jul 30, 2024
1 parent c5c4c0e commit 3e1cccf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ test-image: buildx-machine ## build the container image for all target architecu
.PHONY: package-binaries
package-binaries: $(BINARIES)
mkdir -p dist
@$(eval export BIN_FILES = $(shell ls -d bin/*))
@$(eval export BIN_FILES = $(shell ls bin/))

for binary in $(BINARIES); do \
mv cmd/$${binary}/bin/sha256sums-$${binary}.txt dist/sha256sums-$${binary}.txt; \
Expand All @@ -86,10 +86,14 @@ package-binaries: $(BINARIES)
for arch in $(ARCHS); do \
for os in $(OSs); do \
SUFFIX=$${os}-$${arch}; \
tar cvf dist/ecm-distro-tools.$${SUFFIX}.tar $(BIN_FILES); \
cd bin && \
tar cvf ../dist/ecm-distro-tools.$${SUFFIX}.tar $(BIN_FILES); \
cd ..; \
for binary in $(BINARIES); do \
mv cmd/$${binary}/bin/$${binary}-$${SUFFIX} dist/$${binary}-$${SUFFIX} && \
tar rvf dist/ecm-distro-tools.$${SUFFIX}.tar dist/$${binary}-$${SUFFIX}; \
cd dist && \
tar rvf ecm-distro-tools.$${SUFFIX}.tar $${binary}-$${SUFFIX}; \
cd ..; \
done; \
gzip < dist/ecm-distro-tools.$${SUFFIX}.tar > dist/ecm-distro-tools.$${SUFFIX}.tar.gz && \
rm -f dist/ecm-distro-tools.$${SUFFIX}.tar; \
Expand Down

0 comments on commit 3e1cccf

Please sign in to comment.