Commit defbdbef authored by nanahira's avatar nanahira

add database merging

parent 36c35ff9
stages: stages:
- json - prepare
- prepare2
- pack - pack
- deploy - deploy
...@@ -27,9 +28,22 @@ variables: ...@@ -27,9 +28,22 @@ variables:
# - cd .. # - cd ..
# - exit $(cat dist/redtext.txt | wc -l) # - exit $(cat dist/redtext.txt | wc -l)
json: merge_databases:
stage: json stage: prepare
dependencies: [] dependencies: []
tags:
- linux
script:
- apt update && apt -y install sqlite3
- ls cdbs/test-release.cdb | xargs -I '{}' sqlite3 '{}' .dump | sqlite3 > test-release.cdb
artifacts:
paths:
- test-release.cdb
json:
stage: prepare2
dependencies:
- merge_databases
tags: tags:
- linux - linux
image: git-registry.mycard.moe/mycard/ygopro-cdb-descgen:master-x86 image: git-registry.mycard.moe/mycard/ygopro-cdb-descgen:master-x86
...@@ -52,6 +66,7 @@ json: ...@@ -52,6 +66,7 @@ json:
pack: pack:
stage: pack stage: pack
dependencies: dependencies:
- merge_databases
- json - json
tags: tags:
- linux - linux
...@@ -77,7 +92,8 @@ pack: ...@@ -77,7 +92,8 @@ pack:
server: server:
stage: pack stage: pack
dependencies: [] dependencies:
- merge_databases
tags: tags:
- linux - linux
script: script:
...@@ -141,8 +157,8 @@ deploy: ...@@ -141,8 +157,8 @@ deploy:
stage: deploy stage: deploy
dependencies: dependencies:
- server - server
tags: variables:
- linux SERVER_PATH: ~/ygopro-super-pre/expansions
script: script:
- apt update && apt -y install openssh-client rsync coreutils - apt update && apt -y install openssh-client rsync coreutils
- mkdir ~/.ssh - mkdir ~/.ssh
...@@ -150,7 +166,7 @@ deploy: ...@@ -150,7 +166,7 @@ deploy:
- ssh-keyscan $SERVER_HOST >> ~/.ssh/known_hosts - ssh-keyscan $SERVER_HOST >> ~/.ssh/known_hosts
- echo $NANAHIRA_SSH_KEY | base64 --decode > ~/.ssh/id_rsa - echo $NANAHIRA_SSH_KEY | base64 --decode > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/* - chmod 600 ~/.ssh/*
- rsync -4cavzP --exclude=pics --delete ./server-dist/ $SERVER_USER@$SERVER_HOST:~/ygopro-super-pre/expansions - rsync -4cavzP --exclude=pics --delete ./server-dist/ $SERVER_USER@$SERVER_HOST:$SERVER_PATH
only: only:
- master - master
- tags - tags
......
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