Skip to content

Commit

Permalink
Merge pull request #24 from goldeneggg/check_goreleaser_error
Browse files Browse the repository at this point in the history
check goreleaser error
  • Loading branch information
goldeneggg committed Feb 24, 2019
2 parents b00cdcf + 09fa500 commit 2cc12ae
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ after_success:
deploy:
- provider: script
skip_cleanup: true
script: curl -sL http:https://git.io/goreleaser | bash
script: bash goreleaser.sh
on:
tags: true
go: 1.11.x
condition: $TRAVIS_OS_NAME = linux

notifications:
Expand Down
17 changes: 0 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,3 @@ ci: test lint
.PHONY: goreleaser
goreleaser:
@goreleaser release --debug --rm-dist

# XXX: old and unused tasks as follows

.PHONY: release
release:
@echo "Releasing"
@./scripts/release.sh

.PHONY: publish
publish: release
@echo "Publishing releases to github"
@./scripts/publish.sh

.PHONY: formula
formula:
@echo "Generating formula"
@./scripts/publish.sh formula-only
34 changes: 34 additions & 0 deletions goreleaser.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/sh
set -e

TAR_FILE="/tmp/goreleaser.tar.gz"
RELEASES_URL="https://github.com/goreleaser/goreleaser/releases"
test -z "$TMPDIR" && TMPDIR="$(mktemp -d)"

last_version() {
curl -sL -o /dev/null -w %{url_effective} "$RELEASES_URL/latest" |
rev |
cut -f1 -d'/'|
rev
}

download() {
test -z "$VERSION" && VERSION="$(last_version)"
test -z "$VERSION" && {
echo "Unable to get goreleaser version." >&2
exit 1
}
rm -f "$TAR_FILE"
curl -s -L -o "$TAR_FILE" \
"$RELEASES_URL/download/$VERSION/goreleaser_$(uname -s)_$(uname -m).tar.gz"
}

download
tar -xf "$TAR_FILE" -C "$TMPDIR"
# >>>>> debug for check
env
go env
git diff > /tmp/diff.log
cat /tmp/diff.log
# <<<<<
"${TMPDIR}/goreleaser" "$@"
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main

// VERSION info
const VERSION = "0.8.5"
const VERSION = "0.8.6"

0 comments on commit 2cc12ae

Please sign in to comment.