2015-10-12 02:57:14 +00:00
|
|
|
OUTPUT_DIR = ./builds
|
|
|
|
|
2015-08-21 04:45:43 +00:00
|
|
|
gotty: app/resource.go main.go app/*.go
|
2016-04-13 07:01:14 +00:00
|
|
|
godep go build
|
2015-08-16 09:47:23 +00:00
|
|
|
|
2015-08-23 05:04:31 +00:00
|
|
|
resource: app/resource.go
|
2015-08-21 04:45:43 +00:00
|
|
|
|
2015-08-30 07:27:40 +00:00
|
|
|
app/resource.go: bindata/static/js/hterm.js bindata/static/js/gotty.js bindata/static/index.html bindata/static/favicon.png
|
2015-08-23 05:04:31 +00:00
|
|
|
go-bindata -prefix bindata -pkg app -ignore=\\.gitkeep -o app/resource.go bindata/...
|
2015-08-20 08:16:13 +00:00
|
|
|
gofmt -w app/resource.go
|
2015-08-16 09:47:23 +00:00
|
|
|
|
|
|
|
bindata:
|
|
|
|
mkdir bindata
|
2015-08-16 22:00:17 +00:00
|
|
|
|
2015-08-23 05:04:31 +00:00
|
|
|
bindata/static: bindata
|
|
|
|
mkdir bindata/static
|
|
|
|
|
2015-08-23 11:40:18 +00:00
|
|
|
bindata/static/index.html: bindata/static resources/index.html
|
|
|
|
cp resources/index.html bindata/static/index.html
|
2015-08-29 04:12:04 +00:00
|
|
|
|
2015-08-30 07:27:40 +00:00
|
|
|
bindata/static/favicon.png: bindata/static resources/favicon.png
|
|
|
|
cp resources/favicon.png bindata/static/favicon.png
|
|
|
|
|
2015-08-29 04:12:04 +00:00
|
|
|
bindata/static/js: bindata/static
|
2015-08-30 07:27:40 +00:00
|
|
|
mkdir -p bindata/static/js
|
2015-08-29 04:12:04 +00:00
|
|
|
|
|
|
|
bindata/static/js/hterm.js: bindata/static/js libapps/hterm/js/*.js
|
|
|
|
cd libapps && \
|
|
|
|
LIBDOT_SEARCH_PATH=`pwd` ./libdot/bin/concat.sh -i ./hterm/concat/hterm_all.concat -o ../bindata/static/js/hterm.js
|
|
|
|
|
|
|
|
bindata/static/js/gotty.js: bindata/static/js resources/gotty.js
|
|
|
|
cp resources/gotty.js bindata/static/js/gotty.js
|
2015-10-12 02:57:14 +00:00
|
|
|
|
|
|
|
tools:
|
|
|
|
go get github.com/tools/godep
|
|
|
|
go get github.com/mitchellh/gox
|
|
|
|
go get github.com/tcnksm/ghr
|
2016-04-13 07:01:14 +00:00
|
|
|
go get github.com/jteeuwen/go-bindata/...
|
2015-10-12 02:57:14 +00:00
|
|
|
|
|
|
|
test:
|
2016-04-13 07:01:14 +00:00
|
|
|
if [ `go fmt $(go list ./... | grep -v /vendor/) | wc -l` -gt 0 ]; then echo "go fmt error"; exit 1; fi
|
2015-10-12 02:57:14 +00:00
|
|
|
|
|
|
|
cross_compile:
|
|
|
|
GOARM=5 gox -os="darwin linux freebsd netbsd openbsd" -arch="386 amd64 arm" -output "${OUTPUT_DIR}/pkg/{{.OS}}_{{.Arch}}/{{.Dir}}"
|
|
|
|
|
|
|
|
targz:
|
|
|
|
mkdir -p ${OUTPUT_DIR}/dist
|
|
|
|
cd ${OUTPUT_DIR}/pkg/; for osarch in *; do (cd $$osarch; tar zcvf ../../dist/gotty_$$osarch.tar.gz ./*); done;
|
|
|
|
|
2015-10-18 02:38:12 +00:00
|
|
|
shasums:
|
|
|
|
cd ${OUTPUT_DIR}/dist; shasum * > ./SHASUMS
|
|
|
|
|
2015-10-12 02:57:14 +00:00
|
|
|
release:
|
|
|
|
ghr --delete --prerelease -u yudai -r gotty pre-release ${OUTPUT_DIR}/dist
|