Skip to content
This repository was archived by the owner on Sep 29, 2020. It is now read-only.

Commit 0ad9598

Browse files
authored
Merge pull request #285 from joyent/sungo/dockerfile-release-user-fix
Various fixes to the release process
2 parents f82d723 + 7bc2d9c commit 0ad9598

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

Dockerfile.release

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@ RUN apk add --no-cache --update make git perl-utils dep shadow
77
ARG UID="1000"
88
ARG BRANCH="master"
99

10-
RUN adduser -D -u $UID app
11-
1210
ENV GOPATH "/home/app/go"
1311
ENV PATH "${GOPATH}/bin:${PATH}"
1412
ENV GOCACHE "/home/app/.cache"
1513

1614
RUN mkdir -p "${GOPATH}/src/github.com/joyent/"
17-
RUN chown -R app /home/app
15+
RUN chown -R $UID /home/app
1816

19-
USER app
17+
USER $UID
2018

2119
WORKDIR "${GOPATH}/src/github.com/joyent/"
2220
RUN git clone --branch $BRANCH https://github.com/joyent/conch-shell conch-shell

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ tools: ## Download and install all dev/code tools
4242

4343
PLATFORMS := darwin-amd64 linux-amd64 solaris-amd64 freebsd-amd64 openbsd-amd64 linux-arm
4444
BINARIES := conch conch-minimal tester corpus
45+
RELEASE_BINARIES := conch
4546

4647
BINS := $(foreach bin,$(BINARIES),bin/$(bin))
47-
RELEASES := $(foreach bin,$(BINARIES),release/$(bin))
48+
RELEASES := $(foreach bin,$(RELEASE_BINARIES),release/$(bin))
4849

4950
GIT_REV := $(shell git describe --always --abbrev --dirty --long)
5051
FLAGS_PATH := github.com/joyent/conch-shell/pkg/util
@@ -71,7 +72,7 @@ define release_me
7172
$(eval GOARCH:=$(call arch, $(platform)))
7273
$(eval RPATH:=release/$(BIN)-$(GOOS)-$(GOARCH))
7374

74-
$(BUILD) -o $(RPATH) cmd/$(BIN)/*.go
75+
GOOS=$(GOOS) GOARCH=$(GOARCH) $(BUILD) -o $(RPATH) cmd/$(BIN)/*.go
7576
shasum -a 256 $(RPATH) > $(RPATH).sha256
7677
endef
7778

0 commit comments

Comments
 (0)