Skip to content

Commit

Permalink
Init Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Frey committed Jan 16, 2019
1 parent 7be7654 commit f4225ab
Show file tree
Hide file tree
Showing 52 changed files with 8,144 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: 2
jobs:
deploy:
machine:
enabled: true
steps:
- run:
name: Deploy to fylr.io
command: ssh ec2-user@18.194.217.112 ./fylr.io/deploy.sh
test:
docker:
- image: circleci/golang:1.11
working_directory: ~/fylr
steps:
- checkout
- run: make ensure
- run: make
- run: make vet
- run: make test
workflows:
version: 2
build-and-deploy:
jobs:
- deploy:
filters:
branches:
only: master
build-and-test:
jobs:
- test
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
commit.txt
go.sum
tags
vendor
.DS_Store
*~
.*.sw*
.\#*
\#*#
/fylr-apitest
/fylr.yml
/website/public
/public
tmpl.go
.idea/
apitest_report.json
/commands/server/assets/tmpl.go
45 changes: 45 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
export GO111MODULE=on

SRCDIRS = .
GOFILES = $(shell find $(SRCDIRS) -name "*.go" -type f)
FYLR = fylr-apitest

GITCOMMIT=`git log --pretty=format:'%h' -n 1`
BUILDTIMESTAMP=`date -u +%d.%m.%Y_%H:%M:%S_%Z`
GITVERSIONTAG=`git tag -l 'v*' | tail -1`

# Setup the LDFlags for building the version into the binary
LDFLAGS=-ldflags "-X github.com/programmfabrik/fylr-apitest/commands.buildTimeStamp=${BUILDTIMESTAMP} -X github.com/programmfabrik/fylr-apitest/commands.gitVersion=${GITVERSIONTAG} -X github.com/programmfabrik/fylr-apitest/commands.gitCommit=${GITCOMMIT}"

all: | code
code: ensure
go build ${LDFLAGS} -o $(FYLR)

gox: ensure
gox ${LDFLAGS} -output="dist/fylr_{{.OS}}_{{.Arch}}"

clean:
rm -f $(FYLR)

wipe: clean
find $(SRCDIRS) -name '*~' -type f -exec rm '{}' \;
find $(SRCDIRS) -name '*.sw*' -type f -exec rm '{}' \;

test: ensure $(GOBINDATA) bindata
# add more test directories
go clean -testcache
go test $(TFLAGS) ./...

fmt:
go fmt ./...

ensure:
go mod download

vet:
go vet ./...

getall:
go list -f '{{ join .Deps "\n"}}' | grep github | xargs go get

.PHONY: fmt code clean wipe all ensure vet
Loading

0 comments on commit f4225ab

Please sign in to comment.