Skip to content

Commit

Permalink
Create appveyor_old.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
l3uddz committed Feb 20, 2020
1 parent 9e465a1 commit 4670a8a
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions appveyor_old.yml
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 ../..

0 comments on commit 4670a8a

Please sign in to comment.