2016-09-18 14:14:01 +01:00
|
|
|
# Makefile for releasing CoreDNS
|
|
|
|
|
#
|
2017-10-30 15:55:41 +00:00
|
|
|
# The release is controlled from coremain/version.go. The version found there is
|
|
|
|
|
# used to tag the git repo and to build the assets that are uploaded to github
|
|
|
|
|
# (after some sanity checks).
|
2017-08-13 09:41:50 -07:00
|
|
|
#
|
2017-10-30 15:55:41 +00:00
|
|
|
# The release should be accompanied by release notes published on coredns.io.
|
|
|
|
|
# For example: https://coredns.io/2016/09/18/coredns-001-release/ Also send an
|
|
|
|
|
# email to coredns-discuss@ to announce the new version.
|
2017-08-13 09:41:50 -07:00
|
|
|
#
|
2017-10-30 15:55:41 +00:00
|
|
|
# We use https://github.com/progrium/gh-release to automate github stuff be sure
|
|
|
|
|
# to have that binary in your path.
|
2016-09-18 14:14:01 +01:00
|
|
|
#
|
2016-11-11 09:36:26 +00:00
|
|
|
# Get a list of authors for this release with:
|
|
|
|
|
#
|
2017-10-30 15:55:41 +00:00
|
|
|
# git log --pretty=format:'%an' v001..master | sort -u (where v001 is the
|
|
|
|
|
# previous release, obviously you'll need to adjust this)
|
Makefile: add Windows target (#1199)
While we at it, why not add a target for Windows as well.
This also introduces a VERBOSE option that defaults to -v, but it empty
when releases so that you can actually see what you're building.
Move an @echo out of shell snippet into the Makefile, as that errored
with @echo: command not found.
Sample run and resulting artifacts:
~~~
% make -f Makefile.release build
% find build -type f -exec file {} \;
build/windows/amd64/coredns: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
build/darwin/amd64/coredns: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS>
build/linux/ppc64le/coredns: ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, stripped
build/linux/amd64/coredns: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
build/linux/arm/coredns: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, stripped
build/linux/s390x/coredns: ELF 64-bit MSB executable, IBM S/390, version 1 (SYSV), statically linked, stripped
build/linux/arm64/coredns: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped
% make -f Makefile.release tar
% find release -type f | sort
release/coredns_0.9.9_darwin_amd64.tgz
release/coredns_0.9.9_linux_amd64.tgz
release/coredns_0.9.9_linux_arm64.tgz
release/coredns_0.9.9_linux_arm.tgz
release/coredns_0.9.9_linux_ppc64le.tgz
release/coredns_0.9.9_linux_s390x.tgz
release/coredns_0.9.9_windows_amd64.tgz
~~~
2017-11-03 13:45:13 +00:00
|
|
|
#
|
2016-09-18 14:14:01 +01:00
|
|
|
# Steps:
|
2017-10-30 15:55:41 +00:00
|
|
|
#
|
2016-09-18 14:14:01 +01:00
|
|
|
# * Get an access token: https://help.github.com/articles/creating-an-access-token-for-command-line-use/
|
|
|
|
|
# * export GITHUB_ACCESS_TOKEN=<token>
|
|
|
|
|
# * Up the version in coremain/version.go
|
2017-05-12 10:15:34 +01:00
|
|
|
# * Run: make -f Makefile.release release
|
2017-10-30 15:55:41 +00:00
|
|
|
# * will *commit* your change with 'Release $VERSION'
|
2016-11-11 17:56:54 +00:00
|
|
|
# * push to github
|
|
|
|
|
# * build the release and do all that fluff.
|
2017-03-01 15:46:26 +00:00
|
|
|
#
|
2017-10-30 15:55:41 +00:00
|
|
|
# Steps for docker:
|
|
|
|
|
#
|
2017-03-01 15:46:26 +00:00
|
|
|
# * Login into docker: docker login (should have push creds for coredns registry)
|
2017-11-02 16:15:17 -04:00
|
|
|
# * We use the manifest-tool from https://github.com/estesp/manifest-tool to build the manifest list
|
|
|
|
|
# * Make sure you have the binary in your path.
|
|
|
|
|
#
|
2017-03-01 15:46:26 +00:00
|
|
|
# * Run: make -f Makefile.release docker
|
2017-07-24 08:24:53 -07:00
|
|
|
#
|
2017-10-30 15:55:41 +00:00
|
|
|
# Docker push should happen after you make the new release and uploaded it to
|
|
|
|
|
# Github.
|
2016-09-18 14:14:01 +01:00
|
|
|
|
2017-09-15 09:56:20 +01:00
|
|
|
ifeq (, $(shell which gh-release))
|
Makefile: add Windows target (#1199)
While we at it, why not add a target for Windows as well.
This also introduces a VERBOSE option that defaults to -v, but it empty
when releases so that you can actually see what you're building.
Move an @echo out of shell snippet into the Makefile, as that errored
with @echo: command not found.
Sample run and resulting artifacts:
~~~
% make -f Makefile.release build
% find build -type f -exec file {} \;
build/windows/amd64/coredns: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
build/darwin/amd64/coredns: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS>
build/linux/ppc64le/coredns: ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, stripped
build/linux/amd64/coredns: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
build/linux/arm/coredns: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, stripped
build/linux/s390x/coredns: ELF 64-bit MSB executable, IBM S/390, version 1 (SYSV), statically linked, stripped
build/linux/arm64/coredns: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped
% make -f Makefile.release tar
% find release -type f | sort
release/coredns_0.9.9_darwin_amd64.tgz
release/coredns_0.9.9_linux_amd64.tgz
release/coredns_0.9.9_linux_arm64.tgz
release/coredns_0.9.9_linux_arm.tgz
release/coredns_0.9.9_linux_ppc64le.tgz
release/coredns_0.9.9_linux_s390x.tgz
release/coredns_0.9.9_windows_amd64.tgz
~~~
2017-11-03 13:45:13 +00:00
|
|
|
$(error "No gh-release in $$PATH, install with: go get github.com/progrium/gh-release")
|
2017-09-15 09:56:20 +01:00
|
|
|
endif
|
|
|
|
|
|
2017-11-02 16:15:17 -04:00
|
|
|
ifeq (, $(shell which manifest-tool))
|
Makefile: add Windows target (#1199)
While we at it, why not add a target for Windows as well.
This also introduces a VERBOSE option that defaults to -v, but it empty
when releases so that you can actually see what you're building.
Move an @echo out of shell snippet into the Makefile, as that errored
with @echo: command not found.
Sample run and resulting artifacts:
~~~
% make -f Makefile.release build
% find build -type f -exec file {} \;
build/windows/amd64/coredns: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
build/darwin/amd64/coredns: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS>
build/linux/ppc64le/coredns: ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, stripped
build/linux/amd64/coredns: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
build/linux/arm/coredns: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, stripped
build/linux/s390x/coredns: ELF 64-bit MSB executable, IBM S/390, version 1 (SYSV), statically linked, stripped
build/linux/arm64/coredns: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped
% make -f Makefile.release tar
% find release -type f | sort
release/coredns_0.9.9_darwin_amd64.tgz
release/coredns_0.9.9_linux_amd64.tgz
release/coredns_0.9.9_linux_arm64.tgz
release/coredns_0.9.9_linux_arm.tgz
release/coredns_0.9.9_linux_ppc64le.tgz
release/coredns_0.9.9_linux_s390x.tgz
release/coredns_0.9.9_windows_amd64.tgz
~~~
2017-11-03 13:45:13 +00:00
|
|
|
$(error "No manifest-tool in $$PATH, install with: go get github.com/estesp/manifest-tool")
|
2017-11-02 16:15:17 -04:00
|
|
|
endif
|
|
|
|
|
|
2016-11-27 15:19:41 +00:00
|
|
|
NAME:=coredns
|
2016-09-18 14:14:01 +01:00
|
|
|
VERSION:=$(shell grep 'coreVersion' coremain/version.go | awk '{ print $$3 }' | tr -d '"')
|
2017-02-21 20:02:43 +00:00
|
|
|
GITHUB:=coredns
|
2017-03-01 15:46:26 +00:00
|
|
|
DOCKER:=coredns
|
|
|
|
|
DOCKER_IMAGE_NAME:=$(DOCKER)/$(NAME)
|
2017-08-11 09:47:37 -07:00
|
|
|
GITCOMMIT:=$(shell git describe --dirty --always)
|
2017-11-02 21:21:57 +00:00
|
|
|
LINUX_ARCH=amd64 arm arm64 ppc64le s390x
|
2016-09-18 14:14:01 +01:00
|
|
|
|
2017-05-12 10:15:34 +01:00
|
|
|
all:
|
|
|
|
|
@echo Use the 'release' target to start a release
|
2016-10-19 20:49:27 +01:00
|
|
|
|
2017-08-13 09:41:50 -07:00
|
|
|
release: commit push build tar upload
|
2017-05-12 10:15:34 +01:00
|
|
|
|
|
|
|
|
docker: docker-build docker-upload
|
2017-03-01 15:46:26 +00:00
|
|
|
|
2016-10-19 20:49:27 +01:00
|
|
|
.PHONY: push
|
|
|
|
|
push:
|
|
|
|
|
@echo Pushing release to master
|
|
|
|
|
git push
|
2016-09-18 14:14:01 +01:00
|
|
|
|
2016-11-11 17:56:54 +00:00
|
|
|
.PHONY: commit
|
|
|
|
|
commit:
|
|
|
|
|
@echo Committing
|
|
|
|
|
git commit -am"Release $(VERSION)"
|
|
|
|
|
|
2016-09-18 14:14:01 +01:00
|
|
|
.PHONY: build
|
2017-08-13 09:41:50 -07:00
|
|
|
build:
|
release: add more build targets (#1179)
* release: add more build targets
This adds amd64, ppc and s390. Rework some other builds/directories.
This builds:
% find build
build
build/darwin
build/darwin/x86_64
build/darwin/x86_64/coredns
build/linux
build/linux/ppc64
build/linux/ppc64/coredns
build/linux/x86_64
build/linux/x86_64/coredns
build/linux/arm64
build/linux/arm64/coredns
build/linux/s390
build/linux/s390/coredns
build/linux/arm
build/linux/arm/coredns
% make -f Makefile.release tar
rm -rf release && mkdir release
tar -zcf release/coredns_0.9.9_linux_x86_64.tgz -C build/linux/x86_64 coredns
tar -zcf release/coredns_0.9.9_darwin_x86_64.tgz -C build/darwin/x86_64 coredns
tar -zcf release/coredns_0.9.9_linux_armv6l.tgz -C build/linux/arm coredns
tar -zcf release/coredns_0.9.9_linux_armv8l.tgz -C build/linux/arm64 coredns
tar -zcf release/coredns_0.9.9_linux_ppc64le.tgz -C build/linux/ppc64 coredns
tar -zcf release/coredns_0.9.9_linux_s390x.tgz -C build/linux/s390 coredns
Checking:
% for i in $(find build -type f); do file $i; done
build/darwin/x86_64/coredns: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS>
build/linux/ppc64/coredns: ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, stripped
build/linux/x86_64/coredns: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
build/linux/arm64/coredns: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped
build/linux/s390/coredns: ELF 64-bit MSB executable, IBM S/390, version 1 (SYSV), statically linked, stripped
build/linux/arm/coredns: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, stripped
* code review
2017-10-28 03:54:42 +01:00
|
|
|
@echo Cleaning old builds
|
Makefile: add Windows target (#1199)
While we at it, why not add a target for Windows as well.
This also introduces a VERBOSE option that defaults to -v, but it empty
when releases so that you can actually see what you're building.
Move an @echo out of shell snippet into the Makefile, as that errored
with @echo: command not found.
Sample run and resulting artifacts:
~~~
% make -f Makefile.release build
% find build -type f -exec file {} \;
build/windows/amd64/coredns: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
build/darwin/amd64/coredns: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS>
build/linux/ppc64le/coredns: ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, stripped
build/linux/amd64/coredns: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
build/linux/arm/coredns: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, stripped
build/linux/s390x/coredns: ELF 64-bit MSB executable, IBM S/390, version 1 (SYSV), statically linked, stripped
build/linux/arm64/coredns: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped
% make -f Makefile.release tar
% find release -type f | sort
release/coredns_0.9.9_darwin_amd64.tgz
release/coredns_0.9.9_linux_amd64.tgz
release/coredns_0.9.9_linux_arm64.tgz
release/coredns_0.9.9_linux_arm.tgz
release/coredns_0.9.9_linux_ppc64le.tgz
release/coredns_0.9.9_linux_s390x.tgz
release/coredns_0.9.9_windows_amd64.tgz
~~~
2017-11-03 13:45:13 +00:00
|
|
|
@rm -rf build && mkdir build
|
2017-04-30 11:48:19 +01:00
|
|
|
@echo Building: darwin $(VERSION)
|
Makefile: add Windows target (#1199)
While we at it, why not add a target for Windows as well.
This also introduces a VERBOSE option that defaults to -v, but it empty
when releases so that you can actually see what you're building.
Move an @echo out of shell snippet into the Makefile, as that errored
with @echo: command not found.
Sample run and resulting artifacts:
~~~
% make -f Makefile.release build
% find build -type f -exec file {} \;
build/windows/amd64/coredns: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
build/darwin/amd64/coredns: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS>
build/linux/ppc64le/coredns: ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, stripped
build/linux/amd64/coredns: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
build/linux/arm/coredns: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, stripped
build/linux/s390x/coredns: ELF 64-bit MSB executable, IBM S/390, version 1 (SYSV), statically linked, stripped
build/linux/arm64/coredns: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped
% make -f Makefile.release tar
% find release -type f | sort
release/coredns_0.9.9_darwin_amd64.tgz
release/coredns_0.9.9_linux_amd64.tgz
release/coredns_0.9.9_linux_arm64.tgz
release/coredns_0.9.9_linux_arm.tgz
release/coredns_0.9.9_linux_ppc64le.tgz
release/coredns_0.9.9_linux_s390x.tgz
release/coredns_0.9.9_windows_amd64.tgz
~~~
2017-11-03 13:45:13 +00:00
|
|
|
mkdir -p build/darwin/amd64 && $(MAKE) coredns BINARY=build/darwin/amd64/$(NAME) SYSTEM="GOOS=darwin GOARCH=amd64" CHECKS="" VERBOSE=""
|
|
|
|
|
@echo Building: windows $(VERSION)
|
|
|
|
|
mkdir -p build/windows/amd64 && $(MAKE) coredns BINARY=build/windows/amd64/$(NAME) SYSTEM="GOOS=windows GOARCH=amd64" CHECKS="" VERBOSE=""
|
|
|
|
|
@echo Building: linux/$(LINUX_ARCH) $(VERSION) ;\
|
2017-11-02 21:21:57 +00:00
|
|
|
for arch in $(LINUX_ARCH); do \
|
Makefile: add Windows target (#1199)
While we at it, why not add a target for Windows as well.
This also introduces a VERBOSE option that defaults to -v, but it empty
when releases so that you can actually see what you're building.
Move an @echo out of shell snippet into the Makefile, as that errored
with @echo: command not found.
Sample run and resulting artifacts:
~~~
% make -f Makefile.release build
% find build -type f -exec file {} \;
build/windows/amd64/coredns: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
build/darwin/amd64/coredns: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS>
build/linux/ppc64le/coredns: ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, stripped
build/linux/amd64/coredns: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
build/linux/arm/coredns: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, stripped
build/linux/s390x/coredns: ELF 64-bit MSB executable, IBM S/390, version 1 (SYSV), statically linked, stripped
build/linux/arm64/coredns: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped
% make -f Makefile.release tar
% find release -type f | sort
release/coredns_0.9.9_darwin_amd64.tgz
release/coredns_0.9.9_linux_amd64.tgz
release/coredns_0.9.9_linux_arm64.tgz
release/coredns_0.9.9_linux_arm.tgz
release/coredns_0.9.9_linux_ppc64le.tgz
release/coredns_0.9.9_linux_s390x.tgz
release/coredns_0.9.9_windows_amd64.tgz
~~~
2017-11-03 13:45:13 +00:00
|
|
|
mkdir -p build/linux/amd64 && $(MAKE) coredns BINARY=build/linux/$$arch/$(NAME) SYSTEM="GOOS=linux GOARCH=$$arch" CHECKS="" VERBOSE="" ;\
|
2017-11-02 21:21:57 +00:00
|
|
|
done
|
2016-09-18 14:14:01 +01:00
|
|
|
|
2016-11-27 15:19:41 +00:00
|
|
|
.PHONY: tar
|
|
|
|
|
tar:
|
2017-10-30 15:55:41 +00:00
|
|
|
@echo Cleaning old releases
|
Makefile: add Windows target (#1199)
While we at it, why not add a target for Windows as well.
This also introduces a VERBOSE option that defaults to -v, but it empty
when releases so that you can actually see what you're building.
Move an @echo out of shell snippet into the Makefile, as that errored
with @echo: command not found.
Sample run and resulting artifacts:
~~~
% make -f Makefile.release build
% find build -type f -exec file {} \;
build/windows/amd64/coredns: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
build/darwin/amd64/coredns: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS>
build/linux/ppc64le/coredns: ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, stripped
build/linux/amd64/coredns: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
build/linux/arm/coredns: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, stripped
build/linux/s390x/coredns: ELF 64-bit MSB executable, IBM S/390, version 1 (SYSV), statically linked, stripped
build/linux/arm64/coredns: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped
% make -f Makefile.release tar
% find release -type f | sort
release/coredns_0.9.9_darwin_amd64.tgz
release/coredns_0.9.9_linux_amd64.tgz
release/coredns_0.9.9_linux_arm64.tgz
release/coredns_0.9.9_linux_arm.tgz
release/coredns_0.9.9_linux_ppc64le.tgz
release/coredns_0.9.9_linux_s390x.tgz
release/coredns_0.9.9_windows_amd64.tgz
~~~
2017-11-03 13:45:13 +00:00
|
|
|
@rm -rf release && mkdir release
|
2017-11-02 10:59:30 -07:00
|
|
|
tar -zcf release/$(NAME)_$(VERSION)_darwin_amd64.tgz -C build/darwin/amd64 $(NAME)
|
Makefile: add Windows target (#1199)
While we at it, why not add a target for Windows as well.
This also introduces a VERBOSE option that defaults to -v, but it empty
when releases so that you can actually see what you're building.
Move an @echo out of shell snippet into the Makefile, as that errored
with @echo: command not found.
Sample run and resulting artifacts:
~~~
% make -f Makefile.release build
% find build -type f -exec file {} \;
build/windows/amd64/coredns: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
build/darwin/amd64/coredns: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS>
build/linux/ppc64le/coredns: ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, stripped
build/linux/amd64/coredns: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
build/linux/arm/coredns: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, stripped
build/linux/s390x/coredns: ELF 64-bit MSB executable, IBM S/390, version 1 (SYSV), statically linked, stripped
build/linux/arm64/coredns: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped
% make -f Makefile.release tar
% find release -type f | sort
release/coredns_0.9.9_darwin_amd64.tgz
release/coredns_0.9.9_linux_amd64.tgz
release/coredns_0.9.9_linux_arm64.tgz
release/coredns_0.9.9_linux_arm.tgz
release/coredns_0.9.9_linux_ppc64le.tgz
release/coredns_0.9.9_linux_s390x.tgz
release/coredns_0.9.9_windows_amd64.tgz
~~~
2017-11-03 13:45:13 +00:00
|
|
|
tar -zcf release/$(NAME)_$(VERSION)_windows_amd64.tgz -C build/windows/amd64 $(NAME)
|
2017-11-02 21:21:57 +00:00
|
|
|
for arch in $(LINUX_ARCH); do \
|
|
|
|
|
tar -zcf release/$(NAME)_$(VERSION)_linux_$$arch.tgz -C build/linux/$$arch $(NAME) ;\
|
|
|
|
|
done
|
2016-11-27 15:19:41 +00:00
|
|
|
|
2017-05-12 10:15:34 +01:00
|
|
|
.PHONY: upload
|
|
|
|
|
upload:
|
2016-11-27 15:19:41 +00:00
|
|
|
@echo Releasing: $(VERSION)
|
2016-09-18 14:25:47 +01:00
|
|
|
gh-release create $(GITHUB)/$(NAME) $(VERSION)
|
2016-09-18 14:14:01 +01:00
|
|
|
|
2017-03-01 15:46:26 +00:00
|
|
|
.PHONY: docker-build
|
2017-11-02 21:21:57 +00:00
|
|
|
docker-build: tar
|
|
|
|
|
for arch in $(LINUX_ARCH); do \
|
|
|
|
|
tar -xzf release/$(NAME)_$(VERSION)_linux_$$arch.tgz ;\
|
|
|
|
|
docker build -t coredns . ;\
|
|
|
|
|
docker tag coredns $(DOCKER_IMAGE_NAME):coredns-$$arch ;\
|
|
|
|
|
done
|
2017-03-01 15:46:26 +00:00
|
|
|
|
2017-05-12 10:15:34 +01:00
|
|
|
.PHONY: docker-upload
|
|
|
|
|
docker-upload:
|
2017-03-01 15:46:26 +00:00
|
|
|
@echo Pushing: $(VERSION)
|
2017-11-02 21:21:57 +00:00
|
|
|
for arch in $(LINUX_ARCH); do \
|
|
|
|
|
docker push $(DOCKER_IMAGE_NAME):coredns-$$arch \;
|
|
|
|
|
done
|
2017-11-02 16:15:17 -04:00
|
|
|
manifest-tool push from-args --platforms linux/amd64,linux/arm,linux/arm64,linux/ppc64,linux/s390x --template $(DOCKER_IMAGE_NAME):coredns-ARCH --target $(DOCKER_IMAGE_NAME):$(VERSION)
|
|
|
|
|
manifest-tool push from-args --platforms linux/amd64,linux/arm,linux/arm64,linux/ppc64,linux/s390x --template $(DOCKER_IMAGE_NAME):coredns-ARCH --target $(DOCKER_IMAGE_NAME):latest
|
2017-03-01 15:46:26 +00:00
|
|
|
|
2016-09-18 14:14:01 +01:00
|
|
|
.PHONY: clean
|
|
|
|
|
clean:
|
|
|
|
|
rm -rf release
|
|
|
|
|
rm -rf build
|