-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0842218
Showing
18 changed files
with
523 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
version: 2.1 | ||
|
||
executors: | ||
golang: | ||
working_directory: /go/src/ultre.me/smsify | ||
docker: | ||
- image: circleci/golang:1.12 | ||
environment: | ||
GO111MODULE: "on" | ||
DOCKER_IMAGE: ultreme/smsify | ||
|
||
docker: | ||
docker: | ||
- image: docker:18.06.3-ce-git | ||
|
||
orbs: | ||
codecov: codecov/codecov@1.0.5 | ||
ultreme: ultreme/build@1.5.0 | ||
retry: ultreme/retry@0.6.0 | ||
docker: circleci/docker@0.5.13 | ||
#dl: ultreme/dl@1.7.0 | ||
tools: gotest/tools@0.0.10 | ||
|
||
jobs: | ||
go-build: | ||
executor: golang | ||
steps: | ||
- checkout | ||
- retry/install | ||
- tools/mod-download | ||
- tools/mod-tidy-check | ||
- run: retry -m 3 make install | ||
- run: retry -m 3 make test | ||
- ultreme/install_golangci-lint | ||
- run: PATH=$PATH:$(pwd)/bin retry -m 3 make lint | ||
- codecov/upload: | ||
file: coverage.txt | ||
|
||
docker-build: | ||
executor: docker | ||
steps: | ||
- checkout | ||
- setup_remote_docker: | ||
docker_layer_caching: true | ||
- docker/build: | ||
image: ultreme/smsify | ||
#- docker/dockerlint | ||
|
||
workflows: | ||
main: | ||
jobs: | ||
- go-build | ||
- docker-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
## | ||
## Specific to .dockerignore | ||
## | ||
|
||
.git/ | ||
Dockerfile | ||
contrib/ | ||
|
||
## | ||
## Common with .gitignore | ||
## | ||
|
||
# Temporary files | ||
*~ | ||
*# | ||
.#* | ||
|
||
# Vendors | ||
node_modules/ | ||
vendor/ | ||
|
||
# Binaries for programs and plugins | ||
dist/ | ||
gin-bin | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, build with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
|
||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
indent_style = space | ||
indent_size = 4 | ||
|
||
[Makefile] | ||
indent_style = tab | ||
|
||
[*.go] | ||
indent_style = tab | ||
|
||
[*.proto] | ||
indent_size = 2 | ||
|
||
[*.swift] | ||
indent_size = 4 | ||
|
||
[*.tmpl] | ||
indent_size = 2 | ||
|
||
[*.js] | ||
indent_size = 2 | ||
block_comment_start = /* | ||
block_comment_end = */ | ||
|
||
[*.html] | ||
indent_size = 2 | ||
|
||
[*.bat] | ||
end_of_line = crlf | ||
|
||
[*.{json,yml}] | ||
indent_size = 2 | ||
|
||
[.{babelrc,eslintrc}] | ||
indent_size = 2 | ||
|
||
[{Fastfile,.buckconfig,BUCK}] | ||
indent_size = 2 | ||
|
||
[*.diff] | ||
indent_size = 1 | ||
|
||
[*.m] | ||
indent_size = 1 | ||
indent_style = space | ||
block_comment_start = /** | ||
block_comment = * | ||
block_comment_end = */ | ||
|
||
[*.java] | ||
indent_size = 4 | ||
indent_style = space | ||
block_comment_start = /** | ||
block_comment = * | ||
block_comment_end = */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
# Collapse vendored and generated files on GitHub | ||
vendor/* linguist-vendored | ||
*/vendor/* linguist-vendored | ||
*.gen.* linguist-generated | ||
*.pb.go linguist-generated | ||
|
||
# Reduce conflicts on markdown files | ||
*.md merge=union |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Temporary files | ||
*~ | ||
*# | ||
.#* | ||
coverage.txt | ||
|
||
# Vendors | ||
node_modules/ | ||
vendor/ | ||
|
||
# Binaries for programs and plugins | ||
dist/ | ||
gin-bin | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, build with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
run: | ||
deadline: 1m | ||
tests: false | ||
#skip-files: | ||
# - ".*\\.gen\\.go" | ||
|
||
linters-settings: | ||
golint: | ||
min-confidence: 0 | ||
maligned: | ||
suggest-new: true | ||
goconst: | ||
min-len: 5 | ||
min-occurrences: 4 | ||
misspell: | ||
locale: US | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- goconst | ||
- misspell | ||
- deadcode | ||
- misspell | ||
- structcheck | ||
- errcheck | ||
- unused | ||
- varcheck | ||
- staticcheck | ||
- unconvert | ||
- gofmt | ||
- goimports | ||
- golint | ||
- ineffassign |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
before: | ||
hooks: | ||
- go mod download | ||
builds: | ||
- | ||
goos: [linux, darwin, windows] | ||
goarch: [386, amd64, arm, arm64] | ||
flags: | ||
- "-a" | ||
ldflags: | ||
- '-extldflags "-static"' | ||
env: | ||
- CGO_ENABLED=0 | ||
archives: | ||
- wrap_in_directory: true | ||
replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
386: i386 | ||
amd64: x86_64 | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
brew: | ||
name: smsify | ||
github: | ||
owner: ultreme | ||
name: homebrew-ultreme | ||
commit_author: | ||
name: ultreme-bot | ||
email: "bot@ultre.me" | ||
homepage: https://ultre.me/ | ||
description: "smsify" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# dynamic config | ||
ARG BUILD_DATE | ||
ARG VCS_REF | ||
ARG VERSION | ||
|
||
# build | ||
FROM golang:1.12-alpine as builder | ||
RUN apk add --no-cache git gcc musl-dev make | ||
ENV GO111MODULE=on | ||
WORKDIR /go/src/ultre.me/smsify | ||
COPY go.* ./ | ||
RUN go mod download | ||
COPY . ./ | ||
RUN make install | ||
|
||
# minimalist runtime | ||
FROM alpine:3.10 | ||
LABEL org.label-schema.build-date=$BUILD_DATE \ | ||
org.label-schema.name="smsify" \ | ||
org.label-schema.description="" \ | ||
org.label-schema.url="https://ultre.me/smsify/" \ | ||
org.label-schema.vcs-ref=$VCS_REF \ | ||
org.label-schema.vcs-url="https://github.com/ultreme/smsify" \ | ||
org.label-schema.vendor="Manfred Touron" \ | ||
org.label-schema.version=$VERSION \ | ||
org.label-schema.schema-version="1.0" \ | ||
org.label-schema.cmd="docker run -i -t --rm ultreme/smsify" \ | ||
org.label-schema.help="docker exec -it $CONTAINER smsify --help" | ||
COPY --from=builder /go/bin/smsify /bin/ | ||
ENTRYPOINT ["/bin/smsify"] | ||
#CMD [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
GO ?= go | ||
DOCKER_IMAGE ?= ultreme/smsify | ||
|
||
.PHONY: install | ||
install: | ||
$(GO) install . | ||
|
||
.PHONY: test | ||
test: | ||
echo "" > /tmp/coverage.txt | ||
set -e; for dir in `find . -type f -name "go.mod" | sed 's@/[^/]*$$@@' | sort | uniq`; do ( set -xe; \ | ||
cd $$dir; \ | ||
$(GO) test -mod=readonly -v -cover -coverprofile=/tmp/profile.out -covermode=atomic -race ./...; \ | ||
if [ -f /tmp/profile.out ]; then \ | ||
cat /tmp/profile.out >> /tmp/coverage.txt; \ | ||
rm -f /tmp/profile.out; \ | ||
fi); done | ||
mv /tmp/coverage.txt . | ||
|
||
.PHONY: lint | ||
lint: | ||
golangci-lint run --verbose ./... | ||
|
||
.PHONY: release | ||
release: | ||
goreleaser --snapshot --skip-publish --rm-dist | ||
@echo -n "Do you want to release? [y/N] " && read ans && [ $${ans:-N} = y ] | ||
goreleaser --rm-dist | ||
|
||
.PHONY: docker | ||
docker: | ||
docker build \ | ||
--build-arg VCS_REF=`git rev-parse --short HEAD` \ | ||
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ | ||
--build-arg VERSION=`git describe --tags --always` \ | ||
-t $(DOCKER_IMAGE) . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# smsify | ||
|
||
:smile: smsify | ||
|
||
[![CircleCI](https://circleci.com/gh/ultreme/smsify.svg?style=shield)](https://circleci.com/gh/ultreme/smsify) | ||
[![GoDoc](https://godoc.org/ultre.me/smsify?status.svg)](https://godoc.org/ultre.me/smsify) | ||
[![License](https://img.shields.io/github/license/ultreme/smsify.svg)](https://github.com/ultreme/smsify/blob/master/LICENSE) | ||
[![GitHub release](https://img.shields.io/github/release/ultreme/smsify.svg)](https://github.com/ultreme/smsify/releases) | ||
[![Go Report Card](https://goreportcard.com/badge/ultre.me/smsify)](https://goreportcard.com/report/ultre.me/smsify) | ||
[![CodeFactor](https://www.codefactor.io/repository/github/ultreme/smsify/badge)](https://www.codefactor.io/repository/github/ultreme/smsify) | ||
[![codecov](https://codecov.io/gh/ultreme/smsify/branch/master/graph/badge.svg)](https://codecov.io/gh/ultreme/smsify) | ||
[![Docker Metrics](https://images.microbadger.com/badges/image/ultreme/smsify.svg)](https://microbadger.com/images/ultreme/smsify) | ||
[![Sourcegraph](https://sourcegraph.com/github.com/ultreme/smsify/-/badge.svg)](https://sourcegraph.com/github.com/ultreme/smsify?badge) | ||
[![Made by Ultreme M1ch3l](https://img.shields.io/badge/made%20by-Ultreme%20M1ch3l-blue.svg?style=flat)](https://ultre.me/) | ||
|
||
|
||
## Usage | ||
|
||
```console | ||
$ smsify -h | ||
... | ||
``` | ||
|
||
## Install | ||
|
||
### Using go | ||
|
||
```console | ||
$ go get -u ultre.me/smsify | ||
``` | ||
|
||
### Using brew | ||
|
||
```console | ||
$ brew install ultreme/ultreme/smsify | ||
``` | ||
|
||
### Download releases | ||
|
||
https://github.com/ultreme/smsify/releases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package main // import "ultre.me/smsify" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module ultre.me/smsify | ||
|
||
go 1.12 | ||
|
||
require ( | ||
github.com/urfave/cli v1.21.0 | ||
gopkg.in/urfave/cli.v2 v2.0.0-20190806201727-b62605953717 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= | ||
github.com/urfave/cli v1.21.0 h1:wYSSj06510qPIzGSua9ZqsncMmWE3Zr55KBERygyrxE= | ||
github.com/urfave/cli v1.21.0/go.mod h1:lxDj6qX9Q6lWQxIrbrT0nwecwUtRnhVZAJjJZrVUZZQ= | ||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||
gopkg.in/urfave/cli.v2 v2.0.0-20190806201727-b62605953717 h1:OvXt/p4cdwNl+mwcWMq/AxaKFkhdxcjx+tx+qf4EOvY= | ||
gopkg.in/urfave/cli.v2 v2.0.0-20190806201727-b62605953717/go.mod h1:cKXr3E0k4aosgycml1b5z33BVV6hai1Kh7uDgFOkbcs= | ||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= |
Oops, something went wrong.