Merge pull request #2857 from j-selby/deploy-fix

Travis/AppVeyor: Deploy based upon tags
This commit is contained in:
James Rowe 2017-08-09 19:13:55 -06:00 committed by GitHub
commit 9f6868ad9b
3 changed files with 107 additions and 117 deletions

View File

@ -1,9 +1,8 @@
if [ "$TRAVIS_EVENT_TYPE" = "push" ]&&[ "$TRAVIS_BRANCH" = "master" ]; then
GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`"
GITREV="`git show -s --format='%h'`"
mkdir -p artifacts
GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`"
GITREV="`git show -s --format='%h'`"
mkdir -p artifacts
if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
REV_NAME="citra-linux-${GITDATE}-${GITREV}"
ARCHIVE_NAME="${REV_NAME}.tar.xz"
COMPRESSION_FLAGS="-cJvf"
@ -11,7 +10,7 @@ if [ "$TRAVIS_EVENT_TYPE" = "push" ]&&[ "$TRAVIS_BRANCH" = "master" ]; then
cp build/src/citra/citra "$REV_NAME"
cp build/src/citra_qt/citra-qt "$REV_NAME"
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
REV_NAME="citra-osx-${GITDATE}-${GITREV}"
ARCHIVE_NAME="${REV_NAME}.tar.gz"
COMPRESSION_FLAGS="-czvf"
@ -116,19 +115,18 @@ EOL
# Make the launching script executable
chmod +x ${REV_NAME_ALT}citra-qt.app/Contents/MacOS/citra-qt
fi
# Copy documentation
cp license.txt "$REV_NAME"
cp README.md "$REV_NAME"
tar $COMPRESSION_FLAGS "$ARCHIVE_NAME" "$REV_NAME"
mv "$REV_NAME" nightly
7z a "$REV_NAME.7z" nightly
# move the compiled archive into the artifacts directory to be uploaded by travis releases
mv "$ARCHIVE_NAME" artifacts/
mv "$REV_NAME.7z" artifacts/
fi
# Copy documentation
cp license.txt "$REV_NAME"
cp README.md "$REV_NAME"
tar $COMPRESSION_FLAGS "$ARCHIVE_NAME" "$REV_NAME"
mv "$REV_NAME" nightly
7z a "$REV_NAME.7z" nightly
# move the compiled archive into the artifacts directory to be uploaded by travis releases
mv "$ARCHIVE_NAME" artifacts/
mv "$REV_NAME.7z" artifacts/

View File

@ -37,4 +37,4 @@ deploy:
file: "artifacts/*"
skip_cleanup: true
on:
repo: citra-emu/citra-nightly
tags: true

View File

@ -1,9 +1,6 @@
# shallow clone
clone_depth: 10
# don't build on tag
skip_tags: true
cache:
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml
@ -72,16 +69,11 @@ artifacts:
deploy:
provider: GitHub
release: nightly-$(appveyor_build_number)
description: |
Citra nightly releases. Please choose the correct download for your operating system from the list below.
Short Commit Hash $(GITREV)
release: $(appveyor_repo_tag_name)
auth_token:
secure: "dbpsMC/MgPKWFNJCXpQl4cR8FYhepkPLjgNp/pRMktZ8oLKTqPYErfreaIxb/4P1"
artifact: msvcupdate,msvcbuild
draft: false
prerelease: false
on:
branch: master
appveyor_repo_name: citra-emu/citra-nightly
appveyor_repo_tag: true