Skip to content

Commit

Permalink
Change release filenames @Release
Browse files Browse the repository at this point in the history
  • Loading branch information
wweir committed Jan 21, 2019
1 parent 055c1a2 commit c20c362
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
10 changes: 6 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,24 @@ jobs:
name: build linux Binary
command: |
make build
tar czvf artifacts/sower-linux.tar.gz sower sower.toml sower-client.service sower-server.service
tar czvf artifacts/sower_linux_amd64.tar.gz sower sower.toml sower-client.service sower-server.service
- run:
name: build macOS Binary
command: |
GOOS=darwin GOARCH=amd64 make build
tar czvf artifacts/sower-darwin.tar.gz sower sower.toml cc.wweir.sower.plist
tar czvf artifacts/sower_darwin_amd64.tar.gz sower sower.toml cc.wweir.sower.plist
- run:
name: build Windows Binary
command: |
GOOS=windows GOARCH=amd64 make build
tar czvf artifacts/sower-windows.tar.gz sower sower.toml
tar czvf artifacts/sower_windows_amd64.tar.gz sower sower.toml
- run:
name: Publish Release on GitHub
command: |
if git log -1 --pretty='%s' | grep -oE '(^|\s)@release(\s|$)'; then
go get github.com/tcnksm/ghr
GHR_VERSION="$(curl -s "https://api.github.com/repos/tcnksm/ghr/releases/latest" | awk -F '"' '/tag_name/{printf $4}')"
curl -SLf https://github.com/tcnksm/ghr/releases/download/"$GHR_VERSION"/ghr_"$GHR_VERSION"_linux_amd64.tar.gz | tar xzC /usr/local/bin --strip-components=1
VERSION=$(git describe --tags)
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION%-*-*} artifacts/
fi
Expand Down
6 changes: 3 additions & 3 deletions deploy/install
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ case "$(uname -s)" in
read ADDRESS
echo

curl -SLf https://github.com/wweir/sower/releases/download/$VERSION/sower-darwin.tar.gz | tar xzv
curl -SLf https://github.com/wweir/sower/releases/download/$VERSION/sower_darwin_amd64.tar.gz | tar xzv

mv sower /usr/local/bin/

Expand Down Expand Up @@ -51,7 +51,7 @@ case "$(uname -s)" in
read ADDRESS
echo

curl -SLf https://github.com/wweir/sower/releases/download/$VERSION/sower-linux.tar.gz | tar xzv
curl -SLf https://github.com/wweir/sower/releases/download/$VERSION/sower_linux_amd64.tar.gz | tar xzv

sudo mv sower /usr/local/bin/

Expand All @@ -65,7 +65,7 @@ case "$(uname -s)" in
;;

"s")
curl -SLf https://github.com/wweir/sower/releases/download/$VERSION/sower-linux.tar.gz | tar xzv
curl -SLf https://github.com/wweir/sower/releases/download/$VERSION/sower_linux_amd64.tar.gz | tar xzv

sudo mv sower /usr/local/bin/
sudo mv sower-server.service /etc/systemd/system/
Expand Down
2 changes: 1 addition & 1 deletion deploy/uninstall
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -u -x
set -u -x -e

# main logic
case "$(uname -s)" in
Expand Down

0 comments on commit c20c362

Please sign in to comment.