fix
This commit is contained in:
+4
-4
@@ -6,8 +6,8 @@ steps:
|
||||
- name: versioning
|
||||
image: node:12
|
||||
commands:
|
||||
- export PACKAGE_VERSION=$(cat ./package.json | grep version | head -1 | awk -F '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')
|
||||
- export LATEST_VERSION=$(npm view rpclibrary | grep latest | head -1 | awk -F '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')
|
||||
- PACKAGE_VERSION=$(cat ./package.json | grep version | head -1 | awk -F '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')
|
||||
- LATEST_VERSION=$(npm view rpclibrary | grep latest | head -1 | awk -F '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')
|
||||
- echo "${PACKAGE_VERSION}"
|
||||
- echo "${LATEST_VERSION}"
|
||||
- echo "${DRONE_BUILD_CREATED}"
|
||||
@@ -15,12 +15,12 @@ steps:
|
||||
- git config --global user.name "${DRONE_COMMIT_AUTHOR}"
|
||||
- if [ "${PACKAGE_VERSION}" != "${LATEST_VERSION}" ]; \
|
||||
then \
|
||||
git tag $PACKAGE_VERSION \
|
||||
git tag "$PACKAGE_VERSION" \
|
||||
git status \
|
||||
git push https://$GIT_USER:$GIT_PASSWORD@gitea.frontblock.me/fw-vendor/${DRONE_REPO_NAME}.git $PACKAGE_VERSION \
|
||||
else \
|
||||
echo 'Version ' \
|
||||
echo $LATEST_VERSION \
|
||||
echo "$LATEST_VERSION" \
|
||||
echo 'did not change. Don`t push tag to master' \
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user