From de37a66ef35d47c033bcc51c4bf420f7366a7335 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen Date: Tue, 4 Dec 2018 20:38:32 -0500 Subject: [PATCH 1/4] Dockerfile improvements --- Dockerfile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 092e82a46..5da545278 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,12 @@ # docker run -it lazygit:latest FROM golang:alpine +WORKDIR /go/src/github.com/jesseduffield/lazygit/ +COPY ./ . +RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o lazygit . +FROM alpine:latest RUN apk add -U git xdg-utils - -ADD . /go/src/github.com/jesseduffield/lazygit - -RUN go install github.com/jesseduffield/lazygit - -WORKDIR /go/src/github.com/jesseduffield/lazygit \ No newline at end of file +WORKDIR /root/ +COPY --from=0 /go/src/github.com/jesseduffield/lazygit/lazygit . +CMD ["./lazygit"] From ea6712dec862d8e5d4b7c8731409355a33e208fd Mon Sep 17 00:00:00 2001 From: Tommy Nguyen Date: Wed, 5 Dec 2018 06:11:30 -0500 Subject: [PATCH 2/4] Remove -a -installsuffix; copy to /bin/ --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5da545278..901ba1842 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,10 +5,9 @@ FROM golang:alpine WORKDIR /go/src/github.com/jesseduffield/lazygit/ COPY ./ . -RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o lazygit . +RUN CGO_ENABLED=0 GOOS=linux go build -o lazygit . FROM alpine:latest RUN apk add -U git xdg-utils -WORKDIR /root/ -COPY --from=0 /go/src/github.com/jesseduffield/lazygit/lazygit . -CMD ["./lazygit"] +WORKDIR /go/src/github.com/jesseduffield/lazygit/ +COPY --from=0 /go/src/github.com/jesseduffield/lazygit/lazygit /bin/ From b95abd95ef249e506c175c25deb220f72103aaf3 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen Date: Wed, 5 Dec 2018 17:53:36 -0500 Subject: [PATCH 3/4] Dockerfile: add alias --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 901ba1842..97c518ab3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # run with: # docker build -t lazygit . -# docker run -it lazygit:latest +# docker run -it lazygit:latest /bin/sh -l FROM golang:alpine WORKDIR /go/src/github.com/jesseduffield/lazygit/ @@ -11,3 +11,4 @@ FROM alpine:latest RUN apk add -U git xdg-utils WORKDIR /go/src/github.com/jesseduffield/lazygit/ COPY --from=0 /go/src/github.com/jesseduffield/lazygit/lazygit /bin/ +RUN echo "alias gg=lazygit" >> ~/.profile From 822dc5dada5610dfdea7013883a375ea35c09781 Mon Sep 17 00:00:00 2001 From: Glenn Vriesman Date: Mon, 10 Dec 2018 12:26:30 +0100 Subject: [PATCH 4/4] Moved push-pullables status to the end --- pkg/commands/branch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/commands/branch.go b/pkg/commands/branch.go index 49655c41a..419a106d2 100644 --- a/pkg/commands/branch.go +++ b/pkg/commands/branch.go @@ -22,7 +22,7 @@ type Branch struct { func (b *Branch) GetDisplayStrings() []string { displayName := utils.ColoredString(b.Name, b.GetColor()) if b.Selected && b.Pushables != "" && b.Pullables != "" { - displayName = fmt.Sprintf("↑%s↓%s %s", b.Pushables, b.Pullables, displayName) + displayName = fmt.Sprintf("%s ↑%s↓%s", displayName, b.Pushables, b.Pullables) } return []string{b.Recency, displayName}