diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 59ff580..5357572 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,6 +19,7 @@ build_tag: - tags before_script: - export RELEASE_VERSION=$(echo "${CI_COMMIT_TAG}" | sed 's/v//') + - export STABLE_VERSION=$RELEASE_VERSION - sed -i 's/dl-cdn.alpinelinux.org/repo.cdek.ru\/repository/g' /etc/apk/repositories - apk add nodejs-current yarn - curl -sS https://getcomposer.org/installer | php @@ -26,7 +27,7 @@ build_tag: - yarn set version berry script: - sed -i "s/\(Version:\)\( *\).*/\1\2${RELEASE_VERSION}/" cdek.php - - sed -i "s/\(Stable tag:\)\( *\).*/\1\2${RELEASE_VERSION}/" README.md + - sed -i "s/\(Stable tag:\)\( *\).*/\1\2${STABLE_VERSION}/" README.md - sed -i "s/\(Project-Id-Version:\)\( *\).*/\1\2CDEKDelivery ${RELEASE_VERSION}\"/" lang/cdekdelivery.pot - yarn - yarn build @@ -55,6 +56,7 @@ build_custom: before_script: - !reference [build_tag, before_script] - export RELEASE_VERSION="${CI_COMMIT_REF_NAME}#${CI_COMMIT_SHORT_SHA}" + - export STABLE_VERSION=$(git describe --tags --abbrev=0 | sed 's/v//') script: - !reference [build_tag, script]