diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6870afd..6b36cf0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,7 @@ lint: - mkdir -p /go/src/gitlab.com/signald/signald-go - cp -r * /go/src/gitlab.com/signald/signald-go script: - - git checkout "${CI_COMMIT_BRANCH}" || true + - (git checkout "${CI_COMMIT_BRANCH}" && git pull)|| true - VERSION="$(git describe --abbrev=0 HEAD)-$(git rev-list $(git describe --abbrev=0 HEAD)..HEAD --count)-$(git rev-parse --short=8 HEAD)" - echo "building ${VERSION}" - cd /go/src/gitlab.com/signald/signald-go @@ -40,7 +40,7 @@ lint: - apt-get update - apt-get install -y git-buildpackage dh-golang bash-completion golang-any golang-github-spf13-cobra-dev golang-github-spf13-viper-dev - apt-get install -y ./*.deb && rm -vf *.deb - - git checkout "${CI_COMMIT_BRANCH}" || true + - (git checkout "${CI_COMMIT_BRANCH}" && git pull)|| true - go run ./cmd/signaldctl doc -o man - go run ./cmd/signaldctl completion bash > debian/package.bash-completion - ls *.1 > debian/manpages @@ -83,7 +83,7 @@ build:cross-compile: - mkdir -p /go/src/gitlab.com/signald/signald-go - cp -r * /go/src/gitlab.com/signald/signald-go script: - - git checkout "${CI_COMMIT_BRANCH}" || true + - (git checkout "${CI_COMMIT_BRANCH}" && git pull)|| true - VERSION="$(git describe --abbrev=0 HEAD)-$(git rev-list $(git describe --abbrev=0 HEAD)..HEAD --count)-$(git rev-parse --short=8 HEAD)" - echo "building ${VERSION}" - cd /go/src/gitlab.com/signald/signald-go