-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
1 changed file
with
74 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,74 @@ | ||
version: 1.0.{build} | ||
|
||
image: | ||
- Visual Studio 2015 | ||
|
||
platform: x64 | ||
|
||
branches: | ||
only: | ||
- master | ||
- develop | ||
|
||
# no need for caching as it does not appear to work right now | ||
#cache: | ||
# - vendor -> go.mod, appveyor.yml | ||
|
||
artifacts: | ||
- path: dist/**/*.tar.tgz | ||
name: mediarr | ||
|
||
environment: | ||
GO111MODULE: on | ||
equinox_app_id: app_d3GUrCFKy57 | ||
equinox_app_token: | ||
secure: Yo9r16VT0Na2LrgQ9Yz+EiMo1UDoAF0oY+fTN2Fkuo533GipKtLtKALY6lz5NcCjQ99YSx2bT1a9stDb4pSQUw== | ||
equinox_key_secret: | ||
secure: OxrUAcQMLWdOdnRgQx7mNJLNadQENPPed4kZBkXiEb8EjkI16arh/NNMNwgKTl29 | ||
equinox_key_salt: | ||
secure: SgT7lL3UU7EebphtnUx2dQFTN6Ad9QiGVkCh2B62xMFwW7lyummeb54scTSyHoHTTpAzWpwCJq9hLyHLWiznSg== | ||
|
||
install: | ||
- go version | ||
- go env | ||
- ps: iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/secure-file/master/install.ps1')) | ||
- cmd: appveyor-tools\secure-file -decrypt equinox.key.enc -secret %equinox_key_secret% -salt %equinox_key_salt% | ||
- ps: (Invoke-WebRequest https://bin.equinox.io/c/mBWdkfai63v/release-tool-stable-windows-amd64.zip).Content | Extract-Archive -DestinationPath Get-Location | ||
- cmd: dir | ||
|
||
before_build: | ||
- export COMMIT_TIMESTAMP=$(date -d ${APPVEYOR_REPO_COMMIT_TIMESTAMP} +"%s") | ||
- echo $COMMIT_TIMESTAMP | ||
- |- | ||
if [ ${APPVEYOR_REPO_BRANCH} = "develop" ]; then | ||
export EQUINOX_CHANNEL=beta | ||
else | ||
export EQUINOX_CHANNEL=stable | ||
fi | ||
- |- | ||
if [ ${APPVEYOR_REPO_TAG} = "true" ]; then | ||
export VERSION=${APPVEYOR_REPO_TAG_NAME} | ||
fi | ||
build_script: | ||
- make build | ||
- |- | ||
if [ ${APPVEYOR_REPO_TAG} = "true" ]; then | ||
CC=x86_64-linux-musl-gcc CXX=x86_64-linux-musl-g++ CGO_ENABLED=1 $(pwd)/equinox release \ | ||
--version="${APPVEYOR_REPO_TAG_NAME}" \ | ||
--channel="${EQUINOX_CHANNEL}" \ | ||
--platforms="linux_amd64 darwin_amd64 windows_amd64" \ | ||
--signing-key=equinox.key \ | ||
--app="${equinox_app_id}" \ | ||
--token="${equinox_app_token}" \ | ||
-- \ | ||
-ldflags "-s -w -X github.com/l3uddz/mediarr/build.Version=${VERSION} -X github.com/l3uddz/mediarr/build.GitCommit=${APPVEYOR_REPO_COMMIT::8} -X github.com/l3uddz/mediarr/build.Timestamp=${COMMIT_TIMESTAMP} -linkmode external -extldflags -static" \ | ||
github.com/l3uddz/mediarr | ||
fi | ||
after_build: | ||
- |- | ||
export build=$(find dist/* -type d | sed 's!.*/!!') | ||
cd dist/$build | ||
tar -czf $build.tar.tgz mediarr | ||
cd ../.. |