init go mod & add ignore files
This commit is contained in:
parent
12ca90c707
commit
4f2c91d84b
|
@ -0,0 +1 @@
|
|||
build/
|
|
@ -12,4 +12,5 @@
|
|||
*.out
|
||||
|
||||
# GoLand project files etc.
|
||||
.idea/*
|
||||
.idea/*
|
||||
build/
|
|
@ -0,0 +1,37 @@
|
|||
#VERSION := $(shell echo $(shell git describe --tags) | sed 's/^v//')
|
||||
|
||||
all: install
|
||||
|
||||
###############################################################################
|
||||
# Build / Install
|
||||
###############################################################################
|
||||
|
||||
build: go.sum
|
||||
ifeq ($(OS),Windows_NT)
|
||||
@echo "building habbgo binary..."
|
||||
@go build -mod=readonly $(BUILD_FLAGS) -o build/habbgo.exe ./habbgo
|
||||
else
|
||||
@echo "building habbgo binary..."
|
||||
@go build -mod=readonly $(BUILD_FLAGS) -o build/habbgo ./habbgo
|
||||
endif
|
||||
|
||||
install:
|
||||
@echo "installing habbgo binary..."
|
||||
@go install -mod readonly $(BUILD_FLAGS) ./habbgo
|
||||
|
||||
build-habbgo-docker:
|
||||
docker build -t jtieri/habbgo:latest -f ./docker/habbgo/Dockerfile .
|
||||
|
||||
clean:
|
||||
rm -rf build
|
||||
|
||||
###############################################################################
|
||||
# Tests / CI
|
||||
###############################################################################
|
||||
|
||||
test:
|
||||
@go test -mod readonly -v ./...
|
||||
|
||||
run-docker:
|
||||
docker build -t jtieri/habbgo:latest -f ./docker/habbgo/Dockerfile .
|
||||
docker run jtieri/habbgo
|
|
@ -0,0 +1,8 @@
|
|||
module github.com/jtieri/HabbGo
|
||||
|
||||
go 1.16
|
||||
|
||||
require (
|
||||
github.com/go-sql-driver/mysql v1.6.0
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
)
|
|
@ -0,0 +1,6 @@
|
|||
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
|
||||
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
Loading…
Reference in New Issue