Compare commits

...

14 Commits

Author SHA1 Message Date
Jesse Duffield
968f3b2c1c revert to stock standard goreleaser yml 2018-08-08 23:13:26 +10:00
Jesse Duffield
aacbb72e6c use env github token 2018-08-08 23:09:39 +10:00
Jesse Duffield
48ab294922 remove newline in github token 2018-08-08 23:06:50 +10:00
Jesse Duffield
555996642d try just pointing at the directory 2018-08-08 23:04:51 +10:00
Jesse Duffield
aad4269128 fix yml 2018-08-08 23:03:10 +10:00
Jesse Duffield
b3fbe8453f fix yml format 2018-08-08 23:00:27 +10:00
Jesse Duffield
ffac0e6420 Merge branch 'feature/gorelease' 2018-08-08 22:54:49 +10:00
Jesse Duffield
7371765d47 bring back white borders for everybody 2018-08-08 22:53:24 +10:00
Jesse Duffield
7f75808499 cleanup for goreleaser 2018-08-08 22:51:18 +10:00
Jesse Duffield
778cb14dc4 update to use goreleaser ldflags 2018-08-08 22:48:37 +10:00
Jesse Duffield
00c679a3f0 swap travis for goreleaser 2018-08-08 22:40:01 +10:00
Jesse Duffield
d9ec6f9890 switch border color back to black for osx 2018-08-08 21:53:28 +10:00
Jesse Duffield
9858bfe4c3 use brighter panels for linux 2018-08-08 21:46:56 +10:00
Jesse Duffield
feada164d0 use file glob 2018-08-08 21:22:08 +10:00
5 changed files with 30 additions and 52 deletions

22
.goreleaser.yml Normal file
View File

@@ -0,0 +1,22 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
builds:
- env:
- CGO_ENABLED=0
archive:
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

View File

@@ -1,38 +0,0 @@
language: go
sudo: false
env:
- DEP_VERSION="0.5.0"
matrix:
include:
- go: 1.x
env: LATEST=true
- go: tip
allow_failures:
- go: tip
before_install:
# Download the binary to bin folder in $GOPATH
# - curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-386 -o $GOPATH/bin/dep
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
# Make the binary executable
- chmod +x $GOPATH/bin/dep
- ls $GOPATH/bin/
- dep ensure
- go get github.com/mitchellh/gox
install:
-
script:
# - go get -v ./...
# - diff -u <(echo -n) <(gofmt -d .) # can't make gofmt ignore vendor directory
# - go vet $(go list ./... | grep -v /vendor/)
- if [ "${LATEST}" = "true" ]; then gox -ldflags "-X main.Rev=`git rev-parse --short HEAD` -X main.builddate=`date -u +%Y%m%d.%H%M%S` -X main.Version=${TRAVIS_TAG}" -verbose ./...; fi
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: TnB8I+swjicHuGTXk3ncm1Aaa12eIJqWV/Lhcnbb01i39p6+fyn3vDMdWPcejt3R8gcJqv4wyP8UQVO9G1qkLppt6V/qAuY5x6nX0MgEa3t+8JLJnGYHZYsuIgan/ecAmeu5+6dgUhr9Oq6zQOEv/O88NsALzMlqnEQNXI8XSoScfhkiVDIp3zWov0vBizCdThnNgTx9zRpJVoqxmhWvgt+me2+fOhSx1Y+3ZA2gE7zq8IFAbxp36d0rsR5lKqmTuF+YsF9iQ7Ar+xCjbRunLsZx+VwGqGfpS/qS7EwsEqBI0vEO76eFJkwEsIzOvJiFNhBDUu3upquBFMT4uzxRxH3eV+J4mZtu29UDLdvKI5Q730Lk9AgmH4now+RmP08M0SEXJa+AnHeuBv2u1iU5bu+sI6CORVQzKQwOph9AABDjSZ54wrXIpYEeIW2sz8nx+hiG6QL1mqfM/l+55BR69u3vxKYMryQBxPuzhZCTOqqI4uahlb6GIUNZJ9vGZeIA9HFJq3ymW8cdrpYzhKf3Nx9jK+Yb81h5/AHq9iChXEC63VPCDXXGRllh2UYWNYCaAdtk+ekpLR8299e4CaEregy6g5U2S3/xrBKl87miu1uJ/fquXoxGdSU+JcmsmXZ26sGIU2TCYdNjSfIgpOyfMmB4JNtKHqWRHA9Fe42CRpA=
file:
- lazygit_*
on:
repo: jesseduffield/lazygit
tags: true
condition: $LATEST = true

1
github_token Normal file
View File

@@ -0,0 +1 @@
TnB8I+swjicHuGTXk3ncm1Aaa12eIJqWV/Lhcnbb01i39p6+fyn3vDMdWPcejt3R8gcJqv4wyP8UQVO9G1qkLppt6V/qAuY5x6nX0MgEa3t+8JLJnGYHZYsuIgan/ecAmeu5+6dgUhr9Oq6zQOEv/O88NsALzMlqnEQNXI8XSoScfhkiVDIp3zWov0vBizCdThnNgTx9zRpJVoqxmhWvgt+me2+fOhSx1Y+3ZA2gE7zq8IFAbxp36d0rsR5lKqmTuF+YsF9iQ7Ar+xCjbRunLsZx+VwGqGfpS/qS7EwsEqBI0vEO76eFJkwEsIzOvJiFNhBDUu3upquBFMT4uzxRxH3eV+J4mZtu29UDLdvKI5Q730Lk9AgmH4now+RmP08M0SEXJa+AnHeuBv2u1iU5bu+sI6CORVQzKQwOph9AABDjSZ54wrXIpYEeIW2sz8nx+hiG6QL1mqfM/l+55BR69u3vxKYMryQBxPuzhZCTOqqI4uahlb6GIUNZJ9vGZeIA9HFJq3ymW8cdrpYzhKf3Nx9jK+Yb81h5/AHq9iChXEC63VPCDXXGRllh2UYWNYCaAdtk+ekpLR8299e4CaEregy6g5U2S3/xrBKl87miu1uJ/fquXoxGdSU+JcmsmXZ26sGIU2TCYdNjSfIgpOyfMmB4JNtKHqWRHA9Fe42CRpA=

10
gui.go
View File

@@ -5,7 +5,6 @@ import (
// "io"
// "io/ioutil"
"runtime"
"strings"
"time"
@@ -73,9 +72,6 @@ func handleRefresh(g *gocui.Gui, v *gocui.View) error {
func layout(g *gocui.Gui) error {
g.Highlight = true
g.SelFgColor = gocui.ColorWhite | gocui.AttrBold
if runtime.GOOS != "windows" {
g.FgColor = gocui.ColorBlack
}
width, height := g.Size()
leftSideWidth := width / 3
statusFilesBoundary := 2
@@ -161,7 +157,7 @@ func layout(g *gocui.Gui) error {
v.FgColor = gocui.ColorWhite
}
if v, err := g.SetView("options", -1, optionsTop, width-len(Version)-2, optionsTop+2, 0); err != nil {
if v, err := g.SetView("options", -1, optionsTop, width-len(version)-2, optionsTop+2, 0); err != nil {
if err != gocui.ErrUnknownView {
return err
}
@@ -170,14 +166,14 @@ func layout(g *gocui.Gui) error {
v.Frame = false
}
if v, err := g.SetView("version", width-len(Version)-1, optionsTop, width, optionsTop+2, 0); err != nil {
if v, err := g.SetView("version", width-len(version)-1, optionsTop, width, optionsTop+2, 0); err != nil {
if err != gocui.ErrUnknownView {
return err
}
v.BgColor = gocui.ColorDefault
v.FgColor = gocui.ColorGreen
v.Frame = false
renderString(g, "version", Version)
renderString(g, "version", version)
// these are only called once
handleFileSelect(g, filesView)

11
main.go
View File

@@ -20,13 +20,10 @@ var (
subprocess *exec.Cmd
startTime time.Time
// Rev - Git Revision
Rev string
commit string
version = "unversioned"
// Version - Version number
Version = "unversioned"
builddate string
date string
debuggingFlag = flag.Bool("debug", false, "a boolean")
versionFlag = flag.Bool("v", false, "Print the current version")
)
@@ -77,7 +74,7 @@ func main() {
devLog("\n\n\n\n\n\n\n\n\n\n")
flag.Parse()
if *versionFlag {
fmt.Printf("rev=%s, build date=%s, version=%s", Rev, builddate, Version)
fmt.Printf("commit=%s, build date=%s, version=%s", commit, date, version)
os.Exit(0)
}
verifyInGitRepo()