Skip to content

Commit

Permalink
Merge pull request #11 from devilbox/Makefile-docker
Browse files Browse the repository at this point in the history
Move platform detection into docker Makefile
  • Loading branch information
cytopia authored Oct 24, 2022
2 parents 1678597 + 4cc1a87 commit 5b14e5f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 30 deletions.
10 changes: 9 additions & 1 deletion Makefile.docker
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,19 @@ IMAGE =
# -------------------------------------------------------------------------------------------------
NO_CACHE =
ARGS =
ARCH = linux/amd64
DOCKER_TAG = latest
DIR = .
FILE = Dockerfile

# Auto-detect current platform and use it as default to build for
_PLATFORM = $(shell uname -m)
ifeq ($(strip $(_PLATFORM)),x86_64)
ARCH = linux/amd64
else
ifeq ($(strip $(_PLATFORM)),arm64)
ARCH = linux/arm64
endif
endif

# -------------------------------------------------------------------------------------------------
# Targets
Expand Down
27 changes: 0 additions & 27 deletions Makefile.platform

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ifneq (,)
endif

# Ensure additional Makefiles are present
MAKEFILES = Makefile.docker Makefile.lint Makefile.platform
MAKEFILES = Makefile.docker Makefile.lint
$(MAKEFILES): URL=https://raw.githubusercontent.com/devilbox/makefiles/master/$(@)
$(MAKEFILES):
@if ! (curl --fail -sS -o $(@) $(URL) || wget -O $(@) $(URL)); then \
Expand All @@ -27,7 +27,6 @@ include $(MAKEFILES)
```gitignore
Makefile.docker
Makefile.lint
Makefile.platform
```


Expand Down

0 comments on commit 5b14e5f

Please sign in to comment.