|
@@ -65,22 +65,22 @@ steps:
|
65
|
65
|
- name: versioning
|
66
|
66
|
image: node:12
|
67
|
67
|
commands:
|
68
|
|
- - git config --global user.email "frontwork.me@gmail.com"
|
69
|
|
- - git config --global user.name "drone"
|
70
|
|
- - export PACKAGE_VERSION $(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')
|
71
|
|
- - export LATEST_VERSION $(npm view rpclibrary | grep latest | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')
|
72
|
|
- - >- if [ "${PACKAGE_VERSION}" != "${LATEST_VERSION}" ];
|
73
|
|
- then
|
74
|
|
- git tag $PACKAGE_VERSION
|
75
|
|
- git status
|
76
|
|
- git push https://$GIT_USER:$GIT_PASSWORD@gitea.frontblock.me/fw-vendor/${DRONE_REPO_NAME}.git $PACKAGE_VERSION;
|
77
|
|
- else
|
78
|
|
- echo 'Version: '
|
79
|
|
- echo $LATEST_VERSION
|
80
|
|
- echo 'did not change. Don`t push tag to master';
|
81
|
|
- fi
|
82
|
|
- - echo 'Package Version: '; echo ${PACKAGE_VERSION}
|
83
|
|
- - echo 'Latest Version: '; echo ${LATEST_VERSION}
|
|
68
|
+ - git config --global user.email "frontwork.me@gmail.com"
|
|
69
|
+ - git config --global user.name "drone"
|
|
70
|
+ - export PACKAGE_VERSION $(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')
|
|
71
|
+ - export LATEST_VERSION $(npm view rpclibrary | grep latest | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')
|
|
72
|
+ - >- if [ "${PACKAGE_VERSION}" != "${LATEST_VERSION}" ];
|
|
73
|
+ then
|
|
74
|
+ git tag $PACKAGE_VERSION
|
|
75
|
+ git status
|
|
76
|
+ git push https://$GIT_USER:$GIT_PASSWORD@gitea.frontblock.me/fw-vendor/${DRONE_REPO_NAME}.git $PACKAGE_VERSION;
|
|
77
|
+ else
|
|
78
|
+ echo 'Version: '
|
|
79
|
+ echo $LATEST_VERSION
|
|
80
|
+ echo 'did not change. Don`t push tag to master';
|
|
81
|
+ fi
|
|
82
|
+ - echo 'Package Version: '; echo ${PACKAGE_VERSION}
|
|
83
|
+ - echo 'Latest Version: '; echo ${LATEST_VERSION}
|
84
|
84
|
environment:
|
85
|
85
|
GIT_USER:
|
86
|
86
|
from_secret: git_user
|