forked from heliflieger/a-culfw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
54 lines (52 loc) · 1.74 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
43
44
45
46
47
48
49
50
51
52
53
54
before_script:
- echo "Building a-culfw"
build:a-culfw:
stage: build
script:
- export PATH="/opt/gcc-arm-none-eabi-5_4-2016q3/bin:$PATH"
- cd culfw
- BUILD_TIMESTAMP=`date +'%Y-%m-%d_%H-%M-%S'`
- sed -i "s/BUILD_DATE.*/BUILD_DATE \"$BUILD_TIMESTAMP\"/" version.h
- sed -i "s/BUILD_NUMBER.*/BUILD_NUMBER \"${CI_BUILD_ID}\"/" version.h
- cd Devices
- make
# - VERSION=`grep "VERSION " ../version.h | cut -d '"' -f 2`
# - ZIPNAME=a-culfw_${VERSION}_build_${CI_BUILD_ID}_${CI_BUILD_REF_NAME}.zip
# - find . -name "*.hex" -exec zip -u "${ZIPNAME}" {} \;
# - find . -name "*.bin" -exec zip -u "${ZIPNAME}" {} \;
# - find . -name "README*" -exec zip -u "${ZIPNAME}" {} \;
# - find . -name "*.sh" -exec zip -u "${ZIPNAME}" {} \;
artifacts:
name: a-culfw_build_${CI_BUILD_ID}_${CI_BUILD_REF_NAME}.zip
paths:
- culfw/Devices/**/*.hex
- culfw/Devices/**/*.bin
- culfw/Devices/**/README
- culfw/Devices/**/*.sh
- CHANGELOG
- LICENSE
- README.md
deploy-job:
stage: deploy
script:
- echo "Push to mediafire"
- cd culfw/Devices
- ZIPNAME=a-culfw_${CI_BUILD_REF_NAME}_build_${CI_BUILD_ID}.zip
- find . -name "*.hex" -exec zip -u "../../${ZIPNAME}" {} \;
- find . -name "*.bin" -exec zip -u "../../${ZIPNAME}" {} \;
- find . -name "README*" -exec zip -u "../../${ZIPNAME}" {} \;
- find . -name "*.sh" -exec zip -u "../../${ZIPNAME}" {} \;
- cd ../../
- zip -u ${ZIPNAME} CHANGELOG
- zip -u ${ZIPNAME} LICENSE
- zip -u ${ZIPNAME} README.md
# - cp ${ZIPNAME} /tmp
- mkdir -p tmp
- mediafire-fuse tmp
- cp -rfv ${ZIPNAME} tmp/builds/a-culfw
- sleep 15
- fusermount -u tmp
dependencies:
- build:a-culfw
only:
- tags