update generated project files

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
Jess Frazelle 2018-01-01 13:50:02 -05:00
parent 99efe6c3c9
commit 10deec9bf7
No known key found for this signature in database
GPG key ID: 18F3685C0022BFF3
4 changed files with 9 additions and 8 deletions

2
.gitignore vendored
View file

@ -4,8 +4,6 @@
*.o *.o
*.a *.a
*.so *.so
*.swo
*.swp
# Folders # Folders
_obj _obj

View file

@ -1,4 +1,4 @@
FROM alpine:latest FROM golang:alpine as builder
MAINTAINER Jessica Frazelle <jess@linux.com> MAINTAINER Jessica Frazelle <jess@linux.com>
ENV PATH /go/bin:/usr/local/go/bin:$PATH ENV PATH /go/bin:/usr/local/go/bin:$PATH
@ -11,16 +11,20 @@ COPY . /go/src/github.com/jessfraz/reg
RUN set -x \ RUN set -x \
&& apk add --no-cache --virtual .build-deps \ && apk add --no-cache --virtual .build-deps \
go \
git \ git \
gcc \ gcc \
libc-dev \ libc-dev \
libgcc \ libgcc \
&& cd /go/src/github.com/jessfraz/reg \ && cd /go/src/github.com/jessfraz/reg \
&& go build -o /usr/bin/reg . \ && CGO_ENABLED=0 go build -a -tags netgo -ldflags '-extldflags "-static"' -o /usr/bin/reg . \
&& apk del .build-deps \ && apk del .build-deps \
&& rm -rf /go \ && rm -rf /go \
&& echo "Build complete." && echo "Build complete."
FROM scratch
COPY --from=builder /usr/bin/reg /usr/bin/reg
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
ENTRYPOINT [ "reg" ] ENTRYPOINT [ "reg" ]
CMD [ "--help" ]

View file

@ -1,6 +1,6 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2015 Jess Frazelle Copyright (c) 2018 Jessica Frazelle
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.

View file

@ -70,7 +70,7 @@ staticcheck: ## Verifies `staticcheck` passes
.PHONY: install .PHONY: install
install: ## Installs the executable or package install: ## Installs the executable or package
@echo "+ $@" @echo "+ $@"
@go install . go install -a -tags "$(BUILDTAGS)" ${GO_LDFLAGS} .
define buildpretty define buildpretty
mkdir -p $(BUILDDIR)/$(1)/$(2); mkdir -p $(BUILDDIR)/$(1)/$(2);