Commit 84294177 authored by nanahira's avatar nanahira

Merge branch 'master' into server

parents da8b0733 ff7c4784
......@@ -2,7 +2,7 @@
set -x
set -o errexit
TARGET_YGOPRO_BINARY_PATH=./ygopro-platforms/ygopro-platform-$TARGET_PATFORM
TARGET_YGOPRO_BINARY_PATH=./ygopro-platforms/ygopro-platform-$TARGET_ARCH
export YGOPRO_LIBEVENT_STATIC_PATH=$PWD/libevent-stable
git submodule update --init
......
#!/bin/bash
set -x
set -o errexit
ARCHIVE_FILES=(ygopro LICENSE README.md lib lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound windbot bot bot.conf locales fonts)
# TARGET_LOCALE
# ARCHIVE_SUFFIX
TARGET_PLATFORM=linux
apt update && apt -y install tar git
apt update && apt -y install tar git zstd
git submodule update --init
mkdir dist replay
tar -zcf dist/KoishiPro-$CI_COMMIT_REF_NAME-linux-$TARGET_LOCALE.tar.gz --exclude='.git*' ygopro LICENSE README.md lib lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound windbot bot bot.conf locales fonts
tar -acf "dist/KoishiPro-$CI_COMMIT_REF_NAME-$TARGET_PLATFORM-$TARGET_LOCALE.tar.$ARCHIVE_SUFFIX" --exclude='.git*' "${ARCHIVE_FILES[@]}"
#!/bin/bash
set -x
set -o errexit
ARCHIVE_FILES=(ygopro.app LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound windbot bot bot.conf locales fonts)
# TARGET_LOCALE
# ARCHIVE_SUFFIX
TARGET_PLATFORM=osx
apt update && apt -y install tar git
apt update && apt -y install tar git zstd
git submodule update --init
mkdir dist replay
tar -zcf dist/KoishiPro-$CI_COMMIT_REF_NAME-osx-$TARGET_LOCALE.tar.gz --exclude='.git*' ygopro.app LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound windbot bot bot.conf locales fonts
tar -acf "dist/KoishiPro-$CI_COMMIT_REF_NAME-$TARGET_PLATFORM-$TARGET_LOCALE.tar.$ARCHIVE_SUFFIX" --exclude='.git*' "${ARCHIVE_FILES[@]}"
#!/bin/bash
set -x
set -o errexit
ARCHIVE_FILES=(ygopro.exe LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound bot.conf Bot.exe WindBot locales fonts)
if [[ "$TARGET_LOCALE" == "zh-CN" ]]; then
ARCHIVE_FILES=("${ARCHIVE_FILES[@]}" update-koishipro)
fi
# TARGET_LOCALE
TARGET_PLATFORM=win32
apt update && apt -y install p7zip-full git
git submodule update --init
mkdir dist replay
7z a -mx9 -xr!.git* dist/KoishiPro-$CI_COMMIT_REF_NAME-win32-$TARGET_LOCALE.7z "${ARCHIVE_FILES[@]}"
#!/bin/bash
set -x
set -o errexit
# TARGET_LOCALE
apt update && apt -y install p7zip-full git
git submodule update --init
mkdir dist replay
ARCHIVE_FILES=(ygopro.exe LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound bot.conf Bot.exe WindBot locales fonts)
if [[ "$TARGET_LOCALE" == "zh-CN" ]]; then
if [[ "$TARGET_LOCALE" == "zh-CN" && ARCHIVE_SUFFIX != "zst" ]]; then
ARCHIVE_FILES=("${ARCHIVE_FILES[@]}" update-koishipro)
fi
7z a -mx9 -xr!.git* dist/KoishiPro-$CI_COMMIT_REF_NAME-win32-$TARGET_LOCALE.7z "${ARCHIVE_FILES[@]}"
# TARGET_LOCALE
# ARCHIVE_SUFFIX
TARGET_PLATFORM=win32
apt update && apt -y install tar git zstd
git submodule update --init
mkdir dist replay
tar -acf "dist/KoishiPro-$CI_COMMIT_REF_NAME-$TARGET_PLATFORM-$TARGET_LOCALE.tar.$ARCHIVE_SUFFIX" --exclude='.git*' "${ARCHIVE_FILES[@]}"
#!/bin/bash
set -o errexit
apt update; apt -y install curl jq
apiRoot=https://api.moecube.com
loginInfo=$(curl -sL -X POST $apiRoot/accounts/signin -d account=$MYCARD_USERNAME -d password=$MYCARD_PASSWORD)
token=$(echo $loginInfo | jq '.token' | sed 's/"//g')
header="Authorization: $token"
echo "Login succeeded."
appName="koishipro"
handleErrorMessage() {
rawJsonInput="$1"
successInfo=$(echo "$rawJsonInput" | jq '.success')
statusCode=$(echo "$rawJsonInput" | jq '.statusCode')
if [[ "$successInfo" != "true" ]]; then
failMessage=$(echo "$rawJsonInput" | jq '.success')
echo "$rawJsonInput"
exit 1
fi
}
runForDepot() {
platform=$1
locale=$2
archivePath="./dist/KoishiPro-$appVersion-$platform-$locale.tar.zst"
suffix="?platform=$platform&locale=$locale&arch=generic"
echo "Uploading $archivePath"
result=$(curl -H "$header" -X POST "$apiRoot/release/api/build/$appName/${appVersion}${suffix}" -F file=@$archivePath)
handleErrorMessage "$result"
echo "$result" | jq .
}
runForDepot win32 zh-CN
runForDepot linux zh-CN
runForDepot darwin zh-CN
runForDepot win32 en-US
runForDepot linux en-US
runForDepot darwin en-US
......@@ -62,8 +62,16 @@ mat_windows:
- premake5.exe
- event
exec_windows:
._exec_build:
stage: build
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- bin/
- obj/
exec_windows:
extends: ._exec_build
tags:
- vs
dependencies:
......@@ -71,11 +79,7 @@ exec_windows:
- mat_windows
#variables:
# irrklang_pro: '1'
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- bin/
- obj/
# USE_IRRKLANG: "1"
script:
- git submodule update --init
- bash -c 'cp -rf premake/* .'
......@@ -88,21 +92,16 @@ exec_windows:
- ygopro.exe
exec_linux:
stage: build
extends: ._exec_build
tags:
- linux
variables:
YGOPRO_BUILD_ALL: '1'
USE_IRRKLANG: "1"
#USE_IRRKLANG: "1"
dependencies:
- mat_common
#- mat_irrklang
- mat_linux
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- bin/
- obj/
script:
- apt update; apt -y install git build-essential
- git submodule update --init
......
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