2019-05-23 02:11:49 -05:00
|
|
|
GITCOMMIT = $(shell git rev-list -1 HEAD)
|
|
|
|
GOVERSION = $(shell go version | cut -d' ' -f 3)
|
2019-05-23 11:47:48 -05:00
|
|
|
BUILDTIME = $(shell date -u --iso-8601=seconds)
|
|
|
|
|
|
|
|
# try go get github.com/ahmetb/govvv
|
|
|
|
# this will add branch info & build RFC3339 date also
|
|
|
|
|
2019-05-24 00:47:26 -05:00
|
|
|
run:
|
2019-05-23 11:47:48 -05:00
|
|
|
@echo your version of go must be greater than 2.10. Your version is ${GOVERSION}
|
|
|
|
go build -ldflags "-X main.GITCOMMIT=${GITCOMMIT} -X main.GOVERSION='${GOVERSION}' -X main.BUILDTIME='${BUILDTIME}'"
|
2019-05-24 00:47:26 -05:00
|
|
|
./cloud-control-panel
|
2019-05-22 11:05:23 -05:00
|
|
|
|
2019-05-24 00:47:26 -05:00
|
|
|
debug:
|
2019-05-23 02:11:49 -05:00
|
|
|
@echo your version of go must be greater than 2.10. Your version is ${GOVERSION}
|
2019-05-24 00:47:26 -05:00
|
|
|
go build -ldflags "-X main.GITCOMMIT=${GITCOMMIT} -X main.GOVERSION='${GOVERSION}' -X main.BUILDTIME='${BUILDTIME}'"
|
2019-05-29 04:28:19 -05:00
|
|
|
./cloud-control-panel --debug
|
2019-05-06 02:32:46 -05:00
|
|
|
|
2019-05-09 09:00:38 -05:00
|
|
|
nogui:
|
|
|
|
go build
|
|
|
|
./cloud-control-panel -nogui
|
|
|
|
|
2019-05-06 02:32:46 -05:00
|
|
|
gaper:
|
2019-02-01 07:28:17 -06:00
|
|
|
# 'gaper' is a simple and smart golang tool that just rebuilds every time you change a file
|
|
|
|
# go get -u github.com/maxcnunes/gaper
|
|
|
|
gaper
|
|
|
|
|
2019-05-08 17:29:06 -05:00
|
|
|
#### NEVER DO THIS. THIS APPEARS TO INDUCE INSTABILITY IN GTK
|
2019-05-09 08:52:51 -05:00
|
|
|
bad-run:
|
2019-05-08 17:29:06 -05:00
|
|
|
#### NEVER DO THIS. THIS APPEARS TO INDUCE INSTABILITY IN GTK
|
|
|
|
# go run *.go
|
|
|
|
|
2019-02-01 07:28:17 -06:00
|
|
|
# simple sortcut to push all git changes
|
|
|
|
push:
|
|
|
|
git pull
|
|
|
|
git add --all
|
|
|
|
-git commit -a -s
|
2019-05-11 09:53:32 -05:00
|
|
|
git push --all
|
2019-05-23 05:04:19 -05:00
|
|
|
#git tag v0.4
|
2019-05-11 09:53:32 -05:00
|
|
|
git push --tags
|
2019-02-01 07:28:17 -06:00
|
|
|
|
|
|
|
# should update every go dependancy (?)
|
|
|
|
update:
|
|
|
|
git pull
|
2019-05-21 20:00:45 -05:00
|
|
|
go get -v -t -u .
|
2019-05-07 07:40:07 -05:00
|
|
|
|
|
|
|
# make the json config file human readable
|
2019-05-29 14:46:44 -05:00
|
|
|
config-make-readable:
|
2019-05-24 19:39:05 -05:00
|
|
|
cat ~/.config/cloud-control-panel.json |jq -r --tab
|
2019-05-10 03:45:10 -05:00
|
|
|
|
2019-05-31 11:01:32 -05:00
|
|
|
config-default-config: config-delete
|
2019-05-29 14:46:44 -05:00
|
|
|
echo loading the test config
|
2019-05-30 03:23:26 -05:00
|
|
|
./cloud-control-panel --defaultconfig
|
2019-05-23 17:06:39 -05:00
|
|
|
|
2019-05-29 14:46:44 -05:00
|
|
|
config-delete:
|
|
|
|
echo deleting your current config
|
2019-05-31 19:37:24 -05:00
|
|
|
-mv ~/.config/cloud-control-panel.json /tmp
|
2019-05-23 15:27:05 -05:00
|
|
|
|
2019-05-10 03:45:10 -05:00
|
|
|
diff:
|
|
|
|
git diff
|
2019-05-15 17:32:40 -05:00
|
|
|
|
|
|
|
# https://www.digitalocean.com/community/tutorials/how-to-build-go-executables-for-multiple-platforms-on-ubuntu-16-04
|
|
|
|
build-darwin:
|
|
|
|
env GOOS=darwin GOARCH=amd64 go build
|
|
|
|
|
|
|
|
build-windows:
|
|
|
|
env GOOS=windows GOARCH=amd64 go build
|