Skip to content

Commit

Permalink
More makefile fun
Browse files Browse the repository at this point in the history
  • Loading branch information
liamg committed Nov 23, 2018
1 parent 3e6b7e4 commit de446cc
Show file tree
Hide file tree
Showing 1,112 changed files with 876,731 additions and 70 deletions.
129 changes: 129 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 62 additions & 0 deletions Gopkg.toml
@@ -0,0 +1,62 @@

# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"


[[constraint]]
name = "github.com/BurntSushi/toml"
version = "0.3.1"

[[constraint]]
branch = "master"
name = "github.com/go-gl/gl"

[[constraint]]
branch = "master"
name = "github.com/go-gl/glfw"

[[constraint]]
name = "github.com/gobuffalo/packr"
version = "1.21.3"

[[constraint]]
branch = "master"
name = "github.com/golang/freetype"

[[constraint]]
name = "github.com/kr/pty"
version = "1.1.3"

[[constraint]]
branch = "master"
name = "github.com/riywo/loginshell"

[[constraint]]
name = "github.com/stretchr/testify"
version = "1.2.2"

[[constraint]]
name = "go.uber.org/zap"
version = "1.9.1"

[[constraint]]
branch = "master"
name = "golang.org/x/image"
62 changes: 59 additions & 3 deletions Makefile
@@ -1,15 +1,71 @@
SHELL := /bin/bash
BINARY := aminal
VERSION ?= vlatest
FONTPATH := ./gui/packed-fonts

.PHONY: build
build: test
build: test install-tools
mkdir -p release
go build -o release/$(BINARY)-$(VERSION)
packr -v
go build

.PHONY: test
test:
go test -v ./...
go vet -v

.PHONY: install
install: build
install -m 0755 release/$(BINARY)-$(VERSION) /usr/local/bin/aminal
sudo install -m 0755 aminal "/usr/local/bin/${BINARY}"

.PHONY: install-tools
install-tools:
which dep || curl -L https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
which packr || go get -u github.com/gobuffalo/packr/packr
which github-release || go get -u github.com/aktau/github-release

.PHONY: update-fonts
update-fonts: install-tools
curl -L https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Hack/Regular/complete/Hack%20Regular%20Nerd%20Font%20Complete.ttf -o "${FONTPATH}/Hack Regular Nerd Font Complete.ttf"
curl -L https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Hack/Bold/complete/Hack%20Bold%20Nerd%20Font%20Complete.ttf -o "${FONTPATH}/Hack Bold Nerd Font Complete.ttf"
packr -v

.PHONY: release
release: test install-tools
echo -n "Enter a version: "
read -s VERSION
if [[ "${VERSION}" == "" ]]; then
exit 1
fi
mkdir -p release/bin/darwin/amd64/
mkdir -p release/bin/linux/amd64/
mkdir -p release/bin/linux/i386/
GOOS=darwin GOARCH=amd64 go build -o release/bin/darwin/amd64/${BINARY}
GOOS=linux GOARCH=amd64 go build -o release/bin/linux/amd64/${BINARY}
GOOS=linux GOARCH=386 go build -o release/bin/linux/386/${BINARY}
git tag "${VERSION}"
git push origin "${VERSION}"
github-release release \
--user liamg \
--repo aminal \
--tag "${VERSION}" \
--name "Aminal ${VERSION}"
github-release upload \
--user liamg \
--repo aminal \
--tag "${VERSION}" \
--name "${BINARY}-osx-amd64" \
--file release/bin/darwin/amd64/${BINARY}
github-release upload \
--user liamg \
--repo aminal \
--tag "${VERSION}" \
--name "${BINARY}-linux-amd64" \
--file release/bin/linux/amd64/${BINARY}
github-release upload \
--user liamg \
--repo aminal \
--tag "${VERSION}" \
--name "${BINARY}-linux-386" \
--file release/bin/linux/386/${BINARY}

17 changes: 0 additions & 17 deletions go.mod

This file was deleted.

50 changes: 0 additions & 50 deletions go.sum

This file was deleted.

12 changes: 12 additions & 0 deletions gui/a_gui-packr.go

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions vendor/github.com/BurntSushi/toml/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions vendor/github.com/BurntSushi/toml/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions vendor/github.com/BurntSushi/toml/COMPATIBLE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions vendor/github.com/BurntSushi/toml/COPYING

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit de446cc

Please sign in to comment.