Commit 303003e4 authored by mercury233's avatar mercury233

Merge branch 'master' of https://github.com/mycard/ygopro

parents c9fdd39b cf0b0c70
......@@ -2,6 +2,12 @@ language: cpp
os:
- linux
- osx
env:
matrix:
- locale: zh-CN
- locale: ja-JP
- locale: en-US
sudo: required
dist: trusty
osx_image: xcode8
......@@ -51,20 +57,20 @@ script:
fi
before_deploy:
- curl --location --retry 5 'https://github.com/mycard/ygopro-database/archive/master.tar.gz' | tar --strip-components=1 -zxf - ygopro-database-master/locales
- cp locales/zh-CN/* .
- cp locales/${locale}/* .
- mkdir replay
- mkdir pics
- curl --location --retry 5 --output 'ygopro-images-zh-CN.zip' https://github.com/mycard/ygopro-images/releases/download/latest/ygopro-images-zh-CN.zip
- unzip -q -d pics ygopro-images-zh-CN.zip
- curl --location --retry 5 --output "ygopro-images-${locale}.zip" https://github.com/mycard/ygopro-images/releases/download/latest/ygopro-images-${locale}.zip
- unzip -q -d pics ygopro-images-${locale}.zip
- curl --location --retry 5 --output 'ygopro-starter-pack-master.zip' https://github.com/mycard/ygopro-starter-pack/archive/master.zip
- unzip -q ygopro-starter-pack-master.zip
- cp -r ygopro-starter-pack-master/* .
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then tar -zcf ygopro-$TRAVIS_TAG-$TRAVIS_OS_NAME.tar.gz --format=posix --exclude='.git*' ygopro.app LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar -zcf ygopro-$TRAVIS_TAG-$TRAVIS_OS_NAME.tar.gz --format=posix --exclude='.git*' ygopro LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay; fi
- mv ygopro-starter-pack-master/* .
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then tar -zcf ygopro-$TRAVIS_TAG-$TRAVIS_OS_NAME-${locale}.tar.gz --format=posix --exclude='.git*' ygopro.app LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar -zcf ygopro-$TRAVIS_TAG-$TRAVIS_OS_NAME-${locale}.tar.gz --format=posix --exclude='.git*' ygopro LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay; fi
deploy:
provider: releases
file:
- ygopro-$TRAVIS_TAG-$TRAVIS_OS_NAME.tar.gz
- ygopro-$TRAVIS_TAG-$TRAVIS_OS_NAME-${locale}.tar.gz
api_key:
secure: "Js+zijIaucVvTm/knFOKLQ0KTdn93g/xgka8J4EQymgqM7JizL15sHSlVKPhqIFfMQYi/AUjNs7ikzYRO4QCe09GbYniSnFQhHPyGd7bb1tzJ5a7s8MdbP6rGFZ/v/SEbuTqDCsxtGGCfy9F/WMJ1J7o6dmuFfrAXEDzTtXrQrs="
skip_cleanup: true
......
version: '{build}'
environment:
matrix:
- locale: zh-CN
- locale: ja-JP
- locale: en-US
install:
# fix tar xz
- set PATH=%PATH%;C:\MinGW\msys\1.0\bin
......@@ -52,38 +58,21 @@ build:
after_build:
- mv bin\release\ygopro.exe .
- curl --location --retry 5 'https://github.com/mycard/ygopro-database/archive/master.tar.gz' | tar --strip-components=1 -zxf - ygopro-database-master/locales
- cp locales/zh-CN/* .
- cp locales/%locale%/* .
- mkdir replay
- mkdir pics
- curl --location --retry 5 --output 'ygopro-images-zh-CN.zip' https://github.com/mycard/ygopro-images/releases/download/latest/ygopro-images-zh-CN.zip
- unzip -q -d pics ygopro-images-zh-CN.zip
- curl --location --retry 5 --output 'ygopro-images-%locale%.zip' https://github.com/mycard/ygopro-images/releases/download/latest/ygopro-images-%locale%.zip
- unzip -q -d pics ygopro-images-%locale%.zip
- curl --location --retry 5 --output 'ygopro-starter-pack-master.zip' https://github.com/mycard/ygopro-starter-pack/archive/master.zip
- 7z x ygopro-starter-pack-master.zip
- xcopy /E ygopro-starter-pack-master\* .
- tar -zcf ygopro-%APPVEYOR_REPO_TAG_NAME%-win32.tar.gz --format=posix --exclude='.git*' ygopro.exe LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay
# 语言包
- cd locales/en-US
- mkdir pics # 下载那个语言的卡图
- curl --location --retry 5 --output 'ygopro-images-en-US.zip' https://github.com/mycard/ygopro-images/releases/download/latest/ygopro-images-en-US.zip
- unzip -q -d pics ygopro-images-en-US.zip
- tar -zcf ../../ygopro-lang-en-US-%APPVEYOR_REPO_TAG_NAME%.tar.gz --exclude='.git*' cards.cdb strings.conf pics
- cd ../..
- cd locales/ja-JP
- mkdir pics
- curl --location --retry 5 --output 'ygopro-images-ja-JP.zip' https://github.com/mycard/ygopro-images/releases/download/latest/ygopro-images-ja-JP.zip
- unzip -q -d pics ygopro-images-ja-JP.zip
- tar -zcf ../../ygopro-lang-ja-JP-%APPVEYOR_REPO_TAG_NAME%.tar.gz --exclude='.git*' cards.cdb strings.conf pics
- cd ../..
- unzip -q ygopro-starter-pack-master.zip
- mv ygopro-starter-pack-master/* .
- tar -zcf ygopro-%APPVEYOR_REPO_TAG_NAME%-win32-%locale%.tar.gz --format=posix --exclude='.git*' ygopro.exe LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay
test: off
artifacts:
- path: ygopro-$(APPVEYOR_REPO_TAG_NAME)-win32.tar.gz
- path: ygopro-$(APPVEYOR_REPO_TAG_NAME)-win32-$(locale).tar.gz
name: ygopro
- path: ygopro-lang-en-US-$(APPVEYOR_REPO_TAG_NAME).tar.gz
name: ygopro-lang-en-US
- path: ygopro-lang-ja-JP-$(APPVEYOR_REPO_TAG_NAME).tar.gz
name: ygopro-lang-ja-JP
deploy:
description: 'Automatic build'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment