Skip to content

Commit

Permalink
Support arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
niusmallnan committed Mar 5, 2018
1 parent fed6a08 commit 07d35c9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ CLI_DIR:=$(CURDIR)/components/cli
ENGINE_DIR:=$(CURDIR)/components/engine
PACKAGING_DIR:=$(CURDIR)/components/packaging
VERSION=$(shell cat VERSION)
ARCH:=$(shell $(CURDIR)/detect_arch)

.PHONY: help
help: ## show make targets
Expand All @@ -13,7 +14,7 @@ prepare: ## prepare the components

.PHONY: static
static: ## build static packages
$(MAKE) VERSION=$(VERSION) CLI_DIR=$(CLI_DIR) ENGINE_DIR=$(ENGINE_DIR) -C $(PACKAGING_DIR) ros-static
$(MAKE) VERSION=$(VERSION) CLI_DIR=$(CLI_DIR) ENGINE_DIR=$(ENGINE_DIR) -C $(PACKAGING_DIR) ros-static-$(ARCH)
mkdir -p $(CURDIR)/dist/
cp -r components/packaging/static/build/* $(CURDIR)/dist/

Expand Down
13 changes: 13 additions & 0 deletions detect_arch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env sh

arch="$(uname -m)"

if [ "$arch" = "x86_64" ]; then
arch="amd64"
elif [ "$arch" = "aarch64" ]; then
arch="arm64"
else
echo "uknown"
fi

echo "$arch"
4 changes: 2 additions & 2 deletions vendor.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github.com/niusmallnan/cli bd139c5
github.com/niusmallnan/cli fa7c1da
github.com/niusmallnan/moby 4a207c0
github.com/niusmallnan/docker-ce-packaging 8e4f84d9a
github.com/niusmallnan/docker-ce-packaging d12ecf67

0 comments on commit 07d35c9

Please sign in to comment.