There's so many bugs in this yaml

Jef Roosens 2022-04-17 17:19:03 +02:00
parent 1beedc54f4
commit 5c27361e15
Signed by: Jef Roosens
GPG Key ID: B580B976584B5F30
1 changed files with 6 additions and 4 deletions

View File

@ -13,6 +13,8 @@ pipeline:
gen-vc:
# This is what the official CI uses as well
image: 'ubuntu:latest'
secrets:
- deploy_key
commands:
# Install ssh-agent if not present
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
@ -24,8 +26,8 @@ pipeline:
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
# Configure git credentials
- "git config --global user.email 'vbot@rustybever.be'"
- 'git config --global user.name "vbot"'
- git config --global user.email 'vbot@rustybever.be'
- git config --global user.name 'vbot'
# The following is copied over from the official repo's CI
# https://github.com/vlang/v/blob/master/.github/workflows/gen_vc.yml
@ -36,8 +38,8 @@ pipeline:
- rm -rf vc/v.c vc/v_win.c
- ./v -o vc/v.c -os cross cmd/v
- ./v -o vc/v_win.c -os windows -cc msvc cmd/v
- 'sed -i "1s/^/#define V_COMMIT_HASH \"$COMMIT_HASH\"\n/" vc/v.c'
- 'sed -i "1s/^/#define V_COMMIT_HASH \"$COMMIT_HASH\"\n/" vc/v_win.c'
- 'sed -i "1s/^/#define V_COMMIT_HASH \\"$COMMIT_HASH\"\n/" vc/v.c'
- 'sed -i "1s/^/#define V_COMMIT_HASH \\"$COMMIT_HASH\"\n/" vc/v_win.c'
# ensure the C files are over 5000 lines long, as a safety measure
- [ $(wc -l < vc/v.c) -gt 5000 ]
- [ $(wc -l < vc/v_win.c) -gt 5000 ]