Skip to content

Commit

Permalink
change(misc): Add new release method
Browse files Browse the repository at this point in the history
  • Loading branch information
babarot committed Sep 20, 2019
1 parent 6daaa65 commit c6550df
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 63 deletions.
27 changes: 13 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
PACKAGES := $(shell go list ./...)
COMMIT = $$(git describe --tags --always)
DATE = $$(date -u '+%Y-%m-%d_%H:%M:%S')
BUILD_LDFLAGS = -X $(PKG).commit=$(COMMIT) -X $(PKG).date=$(DATE)
RELEASE_BUILD_LDFLAGS = -s -w $(BUILD_LDFLAGS)

.PHONY: all
all: test
Expand All @@ -11,16 +9,22 @@ all: test
build:
go build

.PHONY: crossbuild
crossbuild:
$(eval version = $(shell gobump show -r))
goxz -pv=v$(version) -os=linux,darwin -arch=386,amd64 -build-ldflags="$(RELEASE_BUILD_LDFLAGS)" \
-d=./dist/v$(version)

.PHONY: test
test:
go test -v -parallel=4 ./...

.PHONY: devel-deps
devel-deps:
@go get -v -u github.com/Songmu/ghch/cmd/ghch
@go get -v -u github.com/Songmu/goxz/cmd/goxz
@go get -v -u github.com/git-chglog/git-chglog/cmd/git-chglog
@go get -v -u github.com/golang/dep/cmd/dep
@go get -v -u golang.org/x/lint/golint
@go get -v -u github.com/haya14busa/goverage
@go get -v -u github.com/haya14busa/reviewdog/cmd/reviewdog
@go get -v -u github.com/motemen/gobump/cmd/gobump
@go get -v -u github.com/tcnksm/ghr

.PHONY: dep
dep: devel-deps
dep ensure -v
Expand All @@ -35,9 +39,4 @@ coverage: devel-deps

.PHONY: release
release:
@./misc/scripts/bump-and-chglog.sh
@./misc/scripts/upload-artifacts.sh

.PHONY: devel-deps
devel-deps:
@./misc/scripts/install-devel-deps.sh
@bash ./misc/scripts/release.sh
29 changes: 0 additions & 29 deletions misc/scripts/bump-and-chglog.sh

This file was deleted.

13 changes: 0 additions & 13 deletions misc/scripts/install-devel-deps.sh

This file was deleted.

3 changes: 3 additions & 0 deletions misc/scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

bash <(wget -o /dev/null -qO - https://git.io/release-go)
7 changes: 0 additions & 7 deletions misc/scripts/upload-artifacts.sh

This file was deleted.

0 comments on commit c6550df

Please sign in to comment.