aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 01ee7da442a3c9e3730da1d83cc1a891e3c14c53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
image: rabits/qt:5.9-desktop

before_script:
  - sudo apt-get install --no-install-recommends -y upx zip unzip
  - qmake --version
  - mkdir lib
  - ./scripts/configure_ubuntu.sh

build linux x86_64:
  stage: build
  tags:
    - docker
    - linux
  script:
    - qmake
    - make -j4
    - upx --lzma -9 --force bin/Attorney_Online

deploy:
  stage: deploy
  tags:
    - docker
    - linux
  script:
    - mkdir artifact
    - cd artifact

    # Base folder
    - mkdir base
    - mkdir base/themes
    - cp -a ../base/themes/default base/themes/
    - cp -a ../base/config.ini base/config.sample.ini
    - cp -a ../base/serverlist.txt base/serverlist.sample.txt

    # Miscellaneous files
    - cp -a ../README.md README.md.txt
    - cp -a ../LICENSE.MIT LICENSE.txt

    # Shared libraries
    - cp -a ../lib/* .

    # Platform-specific
    - cp -a ../bin/Attorney_Online .
    - echo "#!/bin/sh" >> ./run.sh
    - echo "LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./Attorney_Online" >> ./run.sh
    - chmod +x ./run.sh

    # Zipping
    # zip -r -9 -l Attorney_Online_$(git describe --tags)_linux_x86_64.zip .
    - tar cavf Attorney_Online_$(git describe --tags)_x64.tar.xz *
    - echo "Deployment completed - can we move on with the script now?"