mirror of
https://github.com/yudai/gotty.git
synced 2026-03-04 21:00:17 +01:00
parent
f61763f716
commit
f66f0d0443
8 changed files with 22 additions and 266 deletions
16
Makefile
16
Makefile
|
|
@ -3,7 +3,7 @@ GIT_COMMIT = `git rev-parse HEAD | cut -c1-7`
|
|||
VERSION = $(shell git describe --tags)
|
||||
BUILD_OPTIONS = -ldflags "-X main.Version=$(VERSION)"
|
||||
|
||||
gotty: main.go server/*.go webtty/*.go backend/*.go Makefile server/asset.go
|
||||
gotty: main.go assets server/*.go webtty/*.go backend/*.go Makefile
|
||||
go build ${BUILD_OPTIONS}
|
||||
|
||||
docker:
|
||||
|
|
@ -12,18 +12,11 @@ docker:
|
|||
.PHONY: assets
|
||||
assets: bindata/static/js/gotty.js bindata/static/index.html bindata/static/icon.svg bindata/static/favicon.ico bindata/static/css/index.css bindata/static/css/xterm.css bindata/static/css/xterm_customize.css bindata/static/manifest.json bindata/static/icon_192.png
|
||||
|
||||
server/asset.go: assets
|
||||
go-bindata -prefix bindata -pkg server -ignore=\\.gitkeep -o server/asset.go bindata/...
|
||||
gofmt -w server/asset.go
|
||||
|
||||
.PHONY: all
|
||||
all: gotty docker
|
||||
|
||||
bindata:
|
||||
mkdir bindata
|
||||
|
||||
bindata/static: bindata
|
||||
mkdir bindata/static
|
||||
bindata/static:
|
||||
mkdir -p bindata/static
|
||||
|
||||
bindata/static/icon.svg: bindata/static resources/icon.svg
|
||||
cp resources/icon.svg bindata/static/icon.svg
|
||||
|
|
@ -75,7 +68,6 @@ README-options:
|
|||
tools:
|
||||
go get github.com/mitchellh/gox
|
||||
go get github.com/tcnksm/ghr
|
||||
go get github.com/jteeuwen/go-bindata/...
|
||||
|
||||
test:
|
||||
if [ `go fmt $(go list ./... | grep -v /vendor/) | wc -l` -gt 0 ]; then echo "go fmt error"; exit 1; fi
|
||||
|
|
@ -97,4 +89,4 @@ release:
|
|||
ghr -draft ${VERSION} ${OUTPUT_DIR}/dist # -c ${GIT_COMMIT} --delete --prerelease -u sorenisanerd -r gotty ${VERSION}
|
||||
|
||||
clean:
|
||||
rm -fr gotty builds bindata server/asset.go js/dist
|
||||
rm -fr gotty builds js/dist bindata/static
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue