remove unused archs
I am not using nor need arm64 and windows. Removing these from the Makefile. If you see this message and feel like they should be added back (or different archs), ping me.
This commit is contained in:
parent
4568429a69
commit
984752b812
17
Makefile
17
Makefile
@ -1,30 +1,27 @@
|
|||||||
SCRIPTS = $(shell awk '/#!\/bin\/(ba)?sh/&&FNR==1{print FILENAME}' $(shell git ls-files))
|
SCRIPTS = $(shell awk '/#!\/bin\/(ba)?sh/&&FNR==1{print FILENAME}' $(shell git ls-files))
|
||||||
GODEPS = $(shell git ls-files '*.go' go.mod go.sum)
|
GODEPS = $(shell git ls-files '*.go' go.mod go.sum)
|
||||||
GOBIN = $(shell go env GOPATH)/bin/
|
GOBIN = $(shell go env GOPATH)/bin/
|
||||||
|
GOOSARCHS = $(sort darwin/amd64 linux/amd64)
|
||||||
GOOSARCHS = $(sort \
|
|
||||||
darwin/amd64 \
|
|
||||||
darwin/arm64 \
|
|
||||||
linux/amd64 \
|
|
||||||
linux/arm64 \
|
|
||||||
windows/amd64/.exe)
|
|
||||||
|
|
||||||
VSN ?= $(shell git describe --dirty)
|
VSN ?= $(shell git describe --dirty)
|
||||||
VSNHASH = $(shell git rev-parse --verify HEAD)
|
VSNHASH = $(shell git rev-parse --verify HEAD)
|
||||||
LDFLAGS = -ldflags "-X main.Version=$(VSN) -X main.VersionHash=$(VSNHASH)"
|
LDFLAGS = -ldflags "-X main.Version=$(VSN) -X main.VersionHash=$(VSNHASH)"
|
||||||
|
|
||||||
|
undocker: ## builds binary for the current architecture
|
||||||
|
CGO_ENABLED=0 go build $(LDFLAGS) -o $@
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
go test -race -cover ./...
|
go test -race -cover ./...
|
||||||
|
|
||||||
define undockertarget
|
define undockertarget
|
||||||
UNDOCKERS += undocker-$(1)-$(2)-$(VSN)$(firstword $(3))
|
UNDOCKERS += undocker-$(1)-$(2)-$(VSN)
|
||||||
undocker-$(1)-$(2)-$(VSN)$(firstword $(3)): $(GODEPS)
|
undocker-$(1)-$(2)-$(VSN): $(GODEPS)
|
||||||
CGO_ENABLED=0 GOOS=$(1) GOARCH=$(2) go build $(LDFLAGS) -o $$@
|
CGO_ENABLED=0 GOOS=$(1) GOARCH=$(2) go build $(LDFLAGS) -o $$@
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(foreach goosarch,$(GOOSARCHS),\
|
$(foreach goosarch,$(GOOSARCHS),\
|
||||||
$(eval $(call undockertarget,$(word 1,$(subst /, ,$(goosarch))),$(word 2,$(subst /, ,$(goosarch))),$(word 3,$(subst /, ,$(goosarch))))))
|
$(eval $(call undockertarget,$(word 1,$(subst /, ,$(goosarch))),$(word 2,$(subst /, ,$(goosarch))))))
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: $(UNDOCKERS)
|
all: $(UNDOCKERS)
|
||||||
|
14
README.md
14
README.md
@ -20,6 +20,19 @@ systemd, FreeBSD Jails, and many others.
|
|||||||
|
|
||||||
Undocker has no dependencies outside Golang stdlib.
|
Undocker has no dependencies outside Golang stdlib.
|
||||||
|
|
||||||
|
Installation
|
||||||
|
------------
|
||||||
|
|
||||||
|
We recommend using [officially released binaries][3]. To build the project
|
||||||
|
instead, run:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ make undocker
|
||||||
|
```
|
||||||
|
|
||||||
|
The number of officially released binaries is quite limited. If you'd like me
|
||||||
|
to expand a list, please contribute a patch to the Makefile.
|
||||||
|
|
||||||
Usage: convert docker image to rootfs
|
Usage: convert docker image to rootfs
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
|
||||||
@ -107,3 +120,4 @@ MIT
|
|||||||
|
|
||||||
[1]: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
|
[1]: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
|
||||||
[2]: https://fly.io/blog/docker-without-docker/
|
[2]: https://fly.io/blog/docker-without-docker/
|
||||||
|
[3]: http://git.sr.ht/~motiejus/undocker
|
||||||
|
Loading…
Reference in New Issue
Block a user