fix
This commit is contained in:
+32
-32
@@ -1,6 +1,38 @@
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: default
|
name: default
|
||||||
|
|
||||||
|
- name: versioning
|
||||||
|
image: node:12
|
||||||
|
commands:
|
||||||
|
- git config --global user.email "frontwork.me@gmail.com"
|
||||||
|
- git config --global user.name "drone"
|
||||||
|
- >
|
||||||
|
if [ "${PACKAGE_VERSION}" != "${LATEST_VERSION}" ];
|
||||||
|
then
|
||||||
|
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 'did not change. Don`t push tag to master';
|
||||||
|
fi
|
||||||
|
- echo "${PACKAGE_VERSION}"
|
||||||
|
- echo "${LATEST_VERSION}"
|
||||||
|
environment:
|
||||||
|
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:]]')
|
||||||
|
GIT_USER:
|
||||||
|
from_secret: git_user
|
||||||
|
GIT_PASSWORD:
|
||||||
|
from_secret: git_password
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- tag
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: restore cache
|
- name: restore cache
|
||||||
image: drillster/drone-volume-cache
|
image: drillster/drone-volume-cache
|
||||||
@@ -62,38 +94,6 @@ steps:
|
|||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
|
|
||||||
- name: versioning
|
|
||||||
image: node:12
|
|
||||||
commands:
|
|
||||||
- git config --global user.email "frontwork.me@gmail.com"
|
|
||||||
- git config --global user.name "drone"
|
|
||||||
- >
|
|
||||||
if [ "${PACKAGE_VERSION}" != "${LATEST_VERSION}" ];
|
|
||||||
then
|
|
||||||
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 'did not change. Don`t push tag to master';
|
|
||||||
fi
|
|
||||||
- echo "${PACKAGE_VERSION}"
|
|
||||||
- echo "${LATEST_VERSION}"
|
|
||||||
environment:
|
|
||||||
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:]]')
|
|
||||||
GIT_USER:
|
|
||||||
from_secret: git_user
|
|
||||||
GIT_PASSWORD:
|
|
||||||
from_secret: git_password
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
exclude:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
- name: commit documentation
|
- name: commit documentation
|
||||||
image: node:12
|
image: node:12
|
||||||
commands:
|
commands:
|
||||||
|
|||||||
Reference in New Issue
Block a user