maybe fix

This commit is contained in:
Daniel Hübleitner
2019-09-22 12:32:56 +02:00
parent 185601f7ea
commit 903bed57cb
+44 -8
View File
@@ -47,6 +47,47 @@ steps:
commands:
- rm -rf docs
- npm run docs
trigger:
event:
- tag
- name: npm publish
image: plugins/npm
settings:
username: frontwork
password:
from_secret: npm_password
email: frontwork.me@gmail.com
trigger:
event:
- tag
- name: versioning
image: node:12
commands:
- git config --global user.email "frontwork.me@gmail.com"
- git config --global user.name "drone"
- 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:]]')
- 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 master $PACKAGE_VERSION;
else
echo 'Version: '
echo $LATEST_VERSION
echo 'did not change. Don`t push tag to master';
fi
environment:
GIT_USER:
from_secret: git_user
GIT_PASSWORD:
from_secret: git_password
trigger:
event:
exclude:
- tag
- name: commit documentation
image: node:12
@@ -63,14 +104,9 @@ steps:
from_secret: git_user
GIT_PASSWORD:
from_secret: git_password
- name: npm publish
image: plugins/npm
settings:
username: frontwork
password:
from_secret: npm_password
email: frontwork.me@gmail.com
trigger:
event:
- tag
volumes:
- name: cache