diff --git a/.gitignore b/.gitignore index 6f4d55d..6bd64e1 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ # Output of the go coverage tool, specifically when used with LiteIDE *.out +dist diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..755791a --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,63 @@ +project_name: github-releases-notifier +release: + github: + owner: justwatchcom + name: github-releases-notifier + name_template: '{{ .Tag }}' +builds: +- goos: + - linux + - darwin + goarch: + - amd64 + - arm + - arm64 + goarm: + - "6" + main: . + binary: github-releases-notifier + ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -extldflags '-static' + +snapshot: + name_template: SNAPSHOT-{{ .Commit }} + +checksum: + name_template: '{{ .ProjectName }}_{{ .Version }}_checksums.txt' +dist: dist +changelog: + filters: + exclude: + - typo + - Fix + - Merge + - WIP +archive: + name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' + format: tar.gz + files: + - license* + - LICENSE* + - readme* + - README* + - changelog* + - CHANGELOG* +dockers: +- image: justwatchcom/github-releases-notifier + goos: linux + goarch: amd64 + goarm: '' + binary: github-releases-notifier + dockerfile: Dockerfile.amd64 +- image: justwatchcom/github-releases-notifier-armv6 + goos: linux + goarch: arm + goarm: '6' + binary: github-releases-notifier + dockerfile: Dockerfile.armv6 +- image: justwatchcom/github-releases-notifier-arm64 + goos: linux + goarch: arm64 + binary: github-releases-notifier + dockerfile: Dockerfile.arm64 +env_files: + github_token: ~/.goreleaser.token diff --git a/.travis.yml b/.travis.yml index 3413972..15578b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,20 @@ language: go go: - - 1.8.x + - 1.10.x + +services: + - docker before_install: + - go get -u github.com/golang/dep/cmd/dep - go get -v github.com/golang/lint/golint + - go get -d github.com/goreleaser/goreleaser + - cd $GOPATH/src/github.com/goreleaser/goreleaser + - dep ensure -vendor-only + - make setup build + - go install + - cd - script: - make clean diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 9d3a3fa..0000000 --- a/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM golang:1.8 as builder - -ADD . /go/src/github.com/justwatchcom/github-releases-notifier -WORKDIR /go/src/github.com/justwatchcom/github-releases-notifier - -RUN make build - -FROM alpine:3.6 -RUN apk --no-cache add ca-certificates - -COPY --from=builder /go/src/github.com/justwatchcom/github-releases-notifier /bin/ -ENTRYPOINT [ "/bin/github-releases-notifier" ] diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 new file mode 100644 index 0000000..7785609 --- /dev/null +++ b/Dockerfile.amd64 @@ -0,0 +1,5 @@ +FROM alpine:3.6 +RUN apk --no-cache add ca-certificates + +COPY dist/linux_amd64/github-releases-notifier /bin/ +ENTRYPOINT [ "/bin/github-releases-notifier" ] diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 new file mode 100644 index 0000000..46b10b2 --- /dev/null +++ b/Dockerfile.arm64 @@ -0,0 +1,6 @@ +FROM arm64v8/alpine:3.7 +RUN apk --no-cache add ca-certificates + +COPY dist/linux_arm64/github-releases-notifier /bin/ + +ENTRYPOINT [ "/bin/github-releases-notifier" ] diff --git a/Dockerfile.armv6 b/Dockerfile.armv6 new file mode 100644 index 0000000..3e1042e --- /dev/null +++ b/Dockerfile.armv6 @@ -0,0 +1,6 @@ +FROM arm32v6/alpine:3.7 +RUN apk --no-cache add ca-certificates + +COPY dist/linux_arm_6/github-releases-notifier /bin/ + +ENTRYPOINT [ "/bin/github-releases-notifier" ] diff --git a/Makefile b/Makefile index fe27dd7..5e093bb 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,6 @@ -DIST := dist -BIN := bin - -EXECUTABLE := github-releases-notifier - PWD := $(shell pwd) -VERSION := $(shell cat VERSION) -SHA := $(shell cat COMMIT 2>/dev/null || git rev-parse --short=8 HEAD) -DATE := $(shell date -u '+%FT%T%z') - -GOLDFLAGS += -X "main.version=$(VERSION)" -GOLDFLAGS += -X "main.date=$(DATE)" -GOLDFLAGS += -X "main.commit=$(SHA)" -GOLDFLAGS += -extldflags '-static' -GO := CGO_ENABLED=0 go - -GOOS ?= $(shell go version | cut -d' ' -f4 | cut -d'/' -f1) -GOARCH ?= $(shell go version | cut -d' ' -f4 | cut -d'/' -f2) +GO := go PACKAGES ?= $(shell go list ./... | grep -v /vendor/ | grep -v /tests) @@ -29,6 +13,7 @@ all: clean test build clean: $(GO) clean -i ./... find . -type f -name "coverage.out" -delete + if [ -f Dockerfile ]; then rm Dockerfile ; fi .PHONY: fmt fmt: @@ -67,7 +52,13 @@ test: STATUS=0; for PKG in $(PACKAGES); do go test -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG || STATUS=1; done; exit $$STATUS .PHONY: build -build: $(EXECUTABLE)-$(GOOS)-$(GOARCH) +build: + go build + +.PHONY: snapshot +snapshot: + goreleaser --snapshot --rm-dist -$(EXECUTABLE)-$(GOOS)-$(GOARCH): $(wildcard *.go) - $(GO) build -tags '$(TAGS)' -ldflags '-s -w $(GOLDFLAGS)' -o $(EXECUTABLE) +.PHONY: release +release: + goreleaser --rm-dist pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy