Commit 1280a677 authored by Guillaume Lebigot's avatar Guillaume Lebigot

Merge branch '222-builder-un-zip-maitre-a-chaque-commit-via-ci' into 'master'

Resolve "Builder un .zip maître à chaque commit via CI"

Closes #222

See merge request karaokemugen/karaokemugen-app!107
parents bea7a1d7 e373d747
......@@ -17,3 +17,4 @@ karaokemugen-app-linux
karaokemugen-app-macos
dist/
apidoc/
bin/
......@@ -3,39 +3,124 @@ image: node:8-stretch
cache:
paths:
- node_modules/
- bin/
before_script:
- npm install -g yarn
- yarn install
- npm install -g apidoc
- apt-get update -qq && apt-get install -y -qq lftp
- mkdir -p /builds/karaokemugen/karaokemugen-app/app/data
- mkdir -p /builds/karaokemugen/karaokemugen-app/app/db
- cp -R samples/* /builds/karaokemugen/karaokemugen-app/app/data/
- export LANG=en_US
- apt-get update -qq && apt-get install -y -qq lftp zip
stages:
- test
- build
- pkg
- deploy
- deploy_apidoc
test:
stage: test
script:
- node src/index.js --debug --test &disown
- npm install -g yarn
- yarn install
- mkdir -p /builds/karaokemugen/karaokemugen-app/app/data
- mkdir -p /builds/karaokemugen/karaokemugen-app/app/db
- cp -R samples/* /builds/karaokemugen/karaokemugen-app/app/data/
- export LANG=en_US
- npm start -- --debug --test &disown
- bash test/run.sh
only:
- test_removed
- test_disabled
deploy:
stage: deploy
script: "echo lol2"
build:
stage: build
artifacts:
expire_in: 1 day
paths:
- dist/
script:
- npm install -g yarn
- yarn install
- npm run-script build
only:
- master
- next
- tags
pkg_win:
stage: pkg
dependencies:
- build
artifacts:
name: "$CI_COMMIT_REF_NAME-win"
expire_in: 1 day
paths:
- bin/
script:
- npm install -g pkg
- mkdir -p bin
- pkg . --targets node8-win-x64 --out-path bin
only:
- master
- next
- tags
pkg_osx:
stage: pkg
dependencies:
- build
artifacts:
expire_in: 1 day
paths:
- bin/
script:
- npm install -g pkg
- mkdir -p bin
- pkg . --targets node8-macos-x64 --out-path bin
only:
- master
- next
- tags
deploy_apidoc:
stage: deploy_apidoc
deploy_win:
stage: deploy
dependencies:
- pkg_win
script:
- mkdir build_win
- cd build_win
- lftp -c "set ftp:ssl-allow no; open -u $USERNAME,$PASSWORD $HOST; cd downloads; get dist_win.tar.gz"
- tar xvzf dist_win.tar.gz
- rm dist_win.tar.gz
- cp -f ../bin/karaokemugen-app.exe KaraokeMugen.exe
- cp -f ../config.ini.default .
- zip -r KaraokeMugen-$CI_COMMIT_REF_NAME-win64.zip *
- lftp -c "set ftp:ssl-allow no; open -u $USERNAME,$PASSWORD $HOST; cd downloads; put KaraokeMugen-$CI_COMMIT_REF_NAME-win64.zip"
only:
- master
- next
- tags
deploy_osx:
stage: deploy
dependencies:
- pkg_osx
script:
- mkdir build_mac
- cd build_mac
- lftp -c "set ftp:ssl-allow no; open -u $USERNAME,$PASSWORD $HOST; cd downloads; get dist_macos.tar.gz"
- tar xvzf dist_macos.tar.gz
- rm dist_macos.tar.gz
- cp -f ../bin/karaokemugen-app KaraokeMugen
- cp -f ../config.ini.default .
- zip -r KaraokeMugen-$CI_COMMIT_REF_NAME-win64.zip *
- lftp -c "set ftp:ssl-allow no; open -u $USERNAME,$PASSWORD $HOST; cd downloads; put KaraokeMugen-$CI_COMMIT_REF_NAME-win64.zip"
only:
- master
- next
- tags
apidoc:
stage: deploy
script:
- apt-get update -qq && apt-get install -y -qq lftp zip
- npm install apidoc
- apidoc -i src -o apidoc -t apidoc_template
- cd apidoc
- lftp -c "set ftp:ssl-allow no; open -u $USERNAME,$PASSWORD $HOST; cd apidoc; mirror -Rnev --parallel=10"
......
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