/
.gitlab-ci.yml
42 lines (38 loc) · 1.32 KB
/
.gitlab-ci.yml
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
image: registry.gitlab.com/hybrix/hybrixd/base-images/build-image:stable
variables:
GIT_STRATEGY: none
stages:
- build
build:
stage: build
script:
- cd ..
- "git clone -n https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/hybrix/hybrixd/client/implementations/tui-wallet/tui-wallet.git --depth 10 --single-branch --branch $CI_COMMIT_REF_NAME"
- cd tui-wallet
- if git log | grep $CI_COMMIT_SHA; then
- echo "Commit $CI_COMMIT_SHA exists, retrieving it."
- "git -c advice.detachedHead=false checkout $CI_COMMIT_SHA"
- else
- echo "Commit $CI_COMMIT_SHA does not exist, retrieving latest in branch $CI_COMMIT_REF_NAME"
- "git checkout"
- fi
- "git clone -n https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/hybrix/hybrixd/common.git --depth 10 --single-branch --branch master"
- cd common
- "git checkout"
- cd ..
- "git clone -n https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/hybrix/hybrixd/interface.git --depth 10 --single-branch --branch master"
- cd interface
- "git checkout"
- cd ..
- sh scripts/compile.sh
# extract dist
- shopt -s extglob
- rm -rf !(dist) || true
- dist
- mv ./dist/* ./
- rm -rf ./dist || true
# remove .git directory and .* files
- rm -rf ./.git* || true
artifacts:
paths:
- ./*