-
Notifications
You must be signed in to change notification settings - Fork 14
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
1 parent
72ec561
commit 8fd9648
Showing
3 changed files
with
50 additions
and
23 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 |
---|---|---|
@@ -1,27 +1,19 @@ | ||
language: go | ||
go: "1.11" | ||
|
||
stages: | ||
- test | ||
- deploy | ||
script: | ||
- cd compiler | ||
- go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo | ||
- cd .. | ||
- go run compiler/main.go $(git describe) | ||
- ./update_tap.sh $TAP_TOKEN | ||
|
||
jobs: | ||
include: | ||
- stage: test | ||
script: | ||
- go test | ||
|
||
- stage: deploy | ||
if: (tag =~ ^v) AND (branch = master) AND (repo = SrKomodo/shadowfox-updater) | ||
script: | ||
- cd compiler | ||
- go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo | ||
- cd .. | ||
- go run compiler/main.go $(git describe) | ||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: IDjfAWsY8TIGCCHILaZ4V/HvrX/d29B20yhan7O6c0/DjGTCprappcVKBwD8yLPxUWVEfa7sWlO9BcVw4hclHAOHf8eq02I59gkip8ch36djkeub300rv340YrX//MAFEaPix/rI5zFGxswCwuojC+AacliltTpZEemqYp0jR6Shd0luS3BPLA0SApIl7cwLUONVM6L3gIGGmsaZDccKYR+sCuopuP40UgxoC3O4aw/hfg96ihgRkF3toKZSBMZFWvXMd82lsA+bI+WIjalBv/Om3gGWPI+7dlLrIZ5Xt3hOz110PTXi06VjRSsMZUZg7gfFeLI2/akKwjKRgflcMe8yMcGKvCEdYGa4unEDdry/l/LPaekZL2tj7QmqZDjMlVh2Cemrmuv0bZ6osekn3FNdMD7o3XX0OUkgvzKJdRnCVpOj0zCFRp3U5NRkBlnPbTlzc8p+OEKZRUAAaEDNSy39U22zYTQiEOsu1KmMP+ZzsxdXkQOQEW6jjO4dbWxVH4TTcYmM4JqhM6tlSpoXDgUJsZjtnme40FyjMYCEbG0VXI3xkTGMO/EowNDDHl5HHhqO3YELfLZREc2VTlirFnaSclvmiTc0MDJ+5MrXEYnVxb//0TkNzbZskFvsmbatzIAR31u8+Fpm2IFURgTnjfNPNG1i6MqAa3eve1frCdI= | ||
file_glob: true | ||
file: dist/* | ||
skip_cleanup: true | ||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: IDjfAWsY8TIGCCHILaZ4V/HvrX/d29B20yhan7O6c0/DjGTCprappcVKBwD8yLPxUWVEfa7sWlO9BcVw4hclHAOHf8eq02I59gkip8ch36djkeub300rv340YrX//MAFEaPix/rI5zFGxswCwuojC+AacliltTpZEemqYp0jR6Shd0luS3BPLA0SApIl7cwLUONVM6L3gIGGmsaZDccKYR+sCuopuP40UgxoC3O4aw/hfg96ihgRkF3toKZSBMZFWvXMd82lsA+bI+WIjalBv/Om3gGWPI+7dlLrIZ5Xt3hOz110PTXi06VjRSsMZUZg7gfFeLI2/akKwjKRgflcMe8yMcGKvCEdYGa4unEDdry/l/LPaekZL2tj7QmqZDjMlVh2Cemrmuv0bZ6osekn3FNdMD7o3XX0OUkgvzKJdRnCVpOj0zCFRp3U5NRkBlnPbTlzc8p+OEKZRUAAaEDNSy39U22zYTQiEOsu1KmMP+ZzsxdXkQOQEW6jjO4dbWxVH4TTcYmM4JqhM6tlSpoXDgUJsZjtnme40FyjMYCEbG0VXI3xkTGMO/EowNDDHl5HHhqO3YELfLZREc2VTlirFnaSclvmiTc0MDJ+5MrXEYnVxb//0TkNzbZskFvsmbatzIAR31u8+Fpm2IFURgTnjfNPNG1i6MqAa3eve1frCdI= | ||
file_glob: true | ||
file: dist/* | ||
skip_cleanup: true | ||
on: | ||
tags: true |
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,12 @@ | ||
class ShadowfoxUpdater < Formula | ||
desc "An automatic updater for ShadowFox" | ||
homepage "https://github.com/SrKomodo/shadowfox-updater" | ||
url "https://github.com/SrKomodo/shadowfox-updater/releases/download/tag/shadowfox_mac_x64" | ||
version "tag" | ||
sha256 "checksum" | ||
|
||
def install | ||
File.rename("shadowfox_mac_x64", "shadowfox") | ||
bin.install "shadowfox" | ||
end | ||
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,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
TAG=$(git describe) | ||
CHECKSUM=$(sha256sum dist/shadowfox_mac_x64 | cut -d' ' -f1) | ||
|
||
# clone repo | ||
git clone https://github.com/SrKomodo/homebrew-tap.git | ||
cd homebrew-tap | ||
git remote rm origin | ||
git remote add origin https://SrKomodo:$1@github.com/SrKomodo/homebrew-tap.git | ||
|
||
# Compile template | ||
IFS='' | ||
while read line; do | ||
REPLACE1=${line//tag/$TAG} | ||
REPLACE2=${REPLACE1//checksum/$CHECKSUM} | ||
echo $REPLACE2 | ||
done < ../tap_template > Formula/shadowfox-updater.rb | ||
|
||
# Push to tap | ||
git add Formula/shadowfox-updater.rb | ||
git commit -m \"$TAG\" | ||
git push --set-upstream origin master |