Skip to content

Commit

Permalink
Merge pull request xiaods#213 from xiaods/dev
Browse files Browse the repository at this point in the history
Fix Makefile script for download dapper err
  • Loading branch information
xiaods authored Feb 27, 2022
2 parents 5f6642d + 59c6ae5 commit e6f4b46
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
20 changes: 7 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
TARGETS := $(shell ls hack | grep -v \\.sh | grep -v package-airgap| grep -v clean)
TARGETS := $(shell ls hack | grep -v \\.sh)

.dapper:
@echo Downloading dapper
@curl -s https://api.github.com/repos/rancher/dapper/releases/latest \
| grep browser_download_url \
| grep dapper \
| cut -d '"' -f 4 \
| wget -qi -
@mv dapper .dapper
@@chmod +x .dapper
@./.dapper -v

@curl -sL https://releases.rancher.com/dapper/v0.5.1/dapper-$$(uname -s)-$$(uname -m) > .dapper.tmp
@@chmod +x .dapper.tmp
@./.dapper.tmp -v
@mv .dapper.tmp .dapper

$(TARGETS): .dapper
./.dapper $@

Expand All @@ -28,7 +24,5 @@ build/data:
mkdir -p $@

package-airgap:
./hack/package-airgap
./hack/package-airgap.sh

clean:
./hack/clean
2 changes: 1 addition & 1 deletion hack/clean
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

cd $(dirname $0)/..

rm -rf dist bin build k8e kubectl etc
rm -rf dist bin build k8e kubectl
2 changes: 1 addition & 1 deletion hack/package-airgap → hack/package-airgap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ xargs -n1 docker pull <<< "${images}"
docker save ${images} -o dist/artifacts/k8e-airgap-images-${ARCH}.tar
gzip -v -c dist/artifacts/k8e-airgap-images-${ARCH}.tar > dist/artifacts/k8e-airgap-images-${ARCH}.tar.gz
if [ ${ARCH} = amd64 ]; then
cp "${airgap_image_file}" dist/artifacts/k8e-images-amd64.txt
cp "${airgap_image_file}" dist/artifacts/k8e-images.txt
elif [ ${ARCH} = aarch64 ] || [ ${ARCH} = arm64 ]; then
cp "${airgap_image_file}" dist/artifacts/k8e-images-arm64.txt
fi

0 comments on commit e6f4b46

Please sign in to comment.