Initial import
This commit is contained in:
commit
99804336ea
4 changed files with 55 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
_*test.sh
|
||||
trello2mail
|
9
Dockerfile
Normal file
9
Dockerfile
Normal file
|
@ -0,0 +1,9 @@
|
|||
FROM golang:1.10 AS build
|
||||
COPY . /go/src/github.com/glenux/trello2mail-go
|
||||
WORKDIR /go/src/github.com/glenux/trello2mail-go
|
||||
RUN CGO_ENABLED=0 go build -o trello2mail main.go
|
||||
|
||||
FROM alpine:3.7
|
||||
RUN apk add --no-cache ca-certificates
|
||||
COPY --from=build /go/src/github.com/glenux/trello2mail-go/ /usr/bin/trello2mail
|
||||
CMD ["./main"]
|
27
Makefile
Normal file
27
Makefile
Normal file
|
@ -0,0 +1,27 @@
|
|||
|
||||
GOFILES=$(wildcard *.go)
|
||||
NAME=trello2mail
|
||||
|
||||
all: build
|
||||
|
||||
.PHONY: build
|
||||
build: ## build executable
|
||||
go build ./...
|
||||
|
||||
install: ## install binaries
|
||||
go install ./...
|
||||
|
||||
.PHONY: shellcheck
|
||||
shellcheck: ## run shellcheck validation
|
||||
scripts/validate/shellcheck
|
||||
|
||||
.PHONY: help
|
||||
help: ## print this help
|
||||
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
|
||||
|
||||
.PHONY: clean
|
||||
clean: ## remove build artifacts
|
||||
rm -rf ./_build/*
|
||||
|
||||
test: build
|
||||
./test.sh
|
17
test.sh
Executable file
17
test.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
export EMAIL_FROM="admin@example.com"
|
||||
export EMAIL_TO="admin@example.com"
|
||||
export EMAIL_SUBJECT="Daily trello mail"
|
||||
|
||||
export TRELLO_URL="https://trello.com/b/someId/someName"
|
||||
export TRELLO_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
||||
export SMTP_USERNAME="admin"
|
||||
export SMTP_PASSWORD="admin"
|
||||
export SMTP_PORT="465"
|
||||
export SMTP_HOSTNAME="mail.example.com"
|
||||
export SMTP_USE_AUTH="true"
|
||||
export SMTP_USE_SSL="true"
|
||||
|
||||
./_build/trello2mail
|
Loading…
Reference in a new issue