Commit 9fd5159a authored by Crescent/毛虫's avatar Crescent/毛虫

clean responsiblity

parents df47a88e afc7448a
Pipeline #28756 failed with stages
in 23 seconds
/test-release.cdb
stages:
- prepare
- prepare2
- pack
- deploy
variables:
GIT_DEPTH: "1"
# redtext:
# stage: pack
# dependencies: []
# tags:
# - linux
# image: git-registry.mycard.moe/nanahira/srvpro:lite
# variables:
# DATABASE_FILE: expansions/test-release.cdb
# script:
# - apt update && apt -y install sqlite3
# - mv /ygopro-server/ygopro .
# - mkdir dist
# - cd ygopro
# - mkdir -p expansions
# - mv ../script expansions/
# - mv ../*.cdb expansions
# - echo "# Result of redtext test of commit $CI_COMMIT_SHA"
# - echo "select id from datas where type != 0x10 and (type & 0x4000) = 0;" | sqlite3 $DATABASE_FILE | xargs -I {} ./ygopro {} 2>&1 | tee ../dist/redtext.txt
# - cd ..
# - exit $(cat dist/redtext.txt | wc -l)
merge_databases:
stage: prepare
dependencies: []
tags:
- linux
script:
- apt update && apt -y install sqlite3
- ls -1 *.cdb | sed -e '/test-update.cdb/d' -e '/script-fix.cdb/d' | xargs -I '{}' sqlite3 '{}' .dump | sqlite3 test-release.cdb || true
artifacts:
paths:
- test-release.cdb
.json:
stage: prepare2
dependencies:
- merge_databases
tags:
- linux
image: git-registry.mycard.moe/mycard/ygopro-cdb-descgen:master-x86
variables:
YGOPRO_PIC_URL_PREFIX: 'https://cdn02.moecube.com:444/ygopro-super-pre/data/pics/'
YGOPRO_PIC_URL_SUFFIX: '.jpg'
FIELDS: 'name,desc,overallString,picUrl'
GIT_DEPTH: '1000'
OUTPUT_FILENAME: test-release.json
REF_COMMIT: '5.20' # 更新的时候改这里,修改成上一个tag的版本号
script:
- apt update;apt -y install wget
- currentPath=$PWD
- cd /usr/src/app
- wget -O strings.conf https://code.mycard.moe/mycard/ygopro-database/-/raw/master/locales/zh-CN/strings.conf
- env GIT_PATH=$currentPath node dist $currentPath/test-release.cdb ./strings.conf $currentPath/test-strings.conf > $currentPath/$OUTPUT_FILENAME
- cd $currentPath
artifacts:
paths:
- test-release.json
json:
extends: .json
json2:
extends: .json
variables:
FIELDS: 'id,name,desc,overallString,picUrl,createTime,createCommit,updateTime,updateCommit,created,updated'
OUTPUT_FILENAME: test-release-v2.json
artifacts:
paths:
- test-release-v2.json
neos:
stage: pack
dependencies:
- merge_databases
tags:
- linux
script:
- apt update && apt -y install sqlite3
- mkdir neos
- sqlite3 test-release.cdb .dump >> ygopro-super-pre-neos.sql
- sqlite3 test-update.cdb .dump >> ygopro-super-pre-neos.sql
- wget -O cards.cdb https://code.mycard.moe/mycard/ygopro-database/-/raw/master/locales/zh-CN/cards.cdb
- sqlite3 cards.cdb .dump >> ygopro-super-pre-neos.sql
- cat ygopro-super-pre-neos.sql | sqlite3 neos/ygopro-super-pre-neos.cdb || true
artifacts:
paths:
- neos
pack:
stage: pack
dependencies:
- merge_databases
- json
- json2
tags:
- linux
script:
- mkdir -p data archive
- mv test-release.cdb data/
- mv test-update.cdb data/
- mv pics data/
- mv script data/
- mv *.conf data/
- mv pack data/
- mv *.ini data/
- mv test-release.json data/
- mv test-release-v2.json data/
- git show -s --format=%ct $CI_COMMIT_SHA > data/version.txt
- cd data
- 7z a -mx9 ../archive/ygopro-super-pre.zip pics script pack *.cdb *.conf *.ini
- cd ..
- mv archive/ygopro-super-pre.zip archive/ygopro-super-pre.ypk
- cp archive/ygopro-super-pre.ypk archive/ygopro-super-pre-$CI_COMMIT_REF_NAME.ypk
artifacts:
paths:
- data
- archive
server:
stage: pack
dependencies:
- merge_databases
tags:
- linux
script:
- mkdir server-dist
- mv test-release.cdb server-dist
- mv test-update.cdb server-dist
- mv *.conf server-dist
- mv script server-dist
# merge ygopro-pre-data
# - git clone --depth=1 https://code.mycard.moe/mycard/ygopro-pre-data
# - mv ygopro-pre-data/expansions/* server-dist/
# - mv ygopro-pre-data/script/* server-dist/script/
artifacts:
paths:
- server-dist
.minio:
stage: deploy
dependencies:
- pack
tags:
- linux
script:
- aws s3 --endpoint=https://minio.mycard.moe:9000 sync $uploadDir/ s3://mycard/ygopro-super-pre/$uploadDir
upload_archive:
extends: .minio
variables:
uploadDir: archive
only:
- tags
upload_data:
extends: .minio
variables:
uploadDir: data
only:
- tags
upload_neos:
extends: .minio
variables:
uploadDir: neos
dependencies:
- neos
only:
- master
upload_version_json:
extends: .minio
script:
- aws s3 --endpoint=https://minio.mycard.moe:9000 cp data/version.txt s3://mycard/ygopro-super-pre/versions/$CI_COMMIT_REF_NAME/version.txt
- aws s3 --endpoint=https://minio.mycard.moe:9000 cp data/test-release.json s3://mycard/ygopro-super-pre/versions/$CI_COMMIT_REF_NAME/test-release.json
- aws s3 --endpoint=https://minio.mycard.moe:9000 cp data/test-release-v2.json s3://mycard/ygopro-super-pre/versions/$CI_COMMIT_REF_NAME/test-release-v2.json
deploy:
stage: deploy
dependencies:
- pack
tags:
- linux
variables:
username: $MYCARD_USERNAME
password: $MYCARD_PASSWORD
appVersion: $CI_COMMIT_REF_NAME
script:
- apt update; apt -y install tar zstd curl jq
- git clone https://code.mycard.moe/mycard/mycard-package-script
- cd mycard-package-script
- ./index.sh makeBuild ygopro-super-pre ../data || true
- ./index.sh makeBuild ygopro2-super-pre ../data || true
- cd ..
only:
# - master
- tags
.deploy_to_server:
stage: deploy
tags:
- linux
dependencies:
- server
variables:
SERVER_PATH: ~/ygopro-super-pre/expansions
script:
- apt update && apt -y install openssh-client rsync coreutils
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan $SERVER_HOST >> ~/.ssh/known_hosts
- echo $NANAHIRA_SSH_KEY | base64 --decode > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/*
- rsync -4cavzP --exclude=pics --delete ./server-dist/ $SERVER_USER@$SERVER_HOST:$SERVER_PATH
only:
- master
- tags
deploy_to_tiramisu:
extends: .deploy_to_server
variables:
SERVER_HOST: tiramisu.mycard.moe
SERVER_USER: mycard
deploy_to_koishi:
extends: .deploy_to_server
variables:
SERVER_HOST: koishi.momobako.com
SERVER_USER: nanahira
File added
File added
File added
File added
[YGOProExpansionPack]
FileName = ygopro-super-pre.ypk
PackName = ygopro-super-pre
PackAuthor = Mycard
PackHomePage = https://mycard.moe/
[YGOMobileAddServer]
ServerName = 萌卡超先行
ServerDesc = 与萌卡正式卡同步更新并提供超先行卡尝鲜
ServerHost = mygo.superpre.pro
ServerPort = 888
File added
#created by ygomobile
101205081
101205082
101205083
101205084
101205085
101205086
101205087
101205088
101205089
101205090
101205091
101205092
101205093
101205094
101205095
101205096
#created by ygomobile
101206000
101206201
101206202
101206203
101206004
101206005
101206006
101206007
101206008
101206009
101206010
101206011
101206012
101206013
101206014
101206015
101206016
101206017
101206018
101206019
101206020
101206021
101206022
101206023
101206024
101206025
101206026
101206027
101206028
101206029
101206030
101206031
101206032
101206033
101206034
101206035
101206036
101206037
101206038
101206039
101206040
101206204
101206205
101206043
101206044
101206045
101206046
101206047
101206206
101206207
101206050
101206051
101206052
101206053
101206054
101206055
101206056
101206057
101206058
101206059
101206060
101206061
101206062
101206063
101206064
101206065
101206066
101206067
101206208
101206209
101206070
101206071
101206072
101206073
101206074
101206075
101206076
101206077
101206078
101206079
101206080
\ No newline at end of file
#created by ygomobile
100223001
100223002
100223003
100223004
100223005
100223006
100223007
100223008
100223010
#created by ygomobile
100224002
100224018
100224019
100224032
#created by ygomobile
100221000
100200256
100200257
100200258
100230001
100225001
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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