drone
This commit is contained in:
+3
-14
@@ -6,23 +6,12 @@ steps:
|
|||||||
- name: versioning
|
- name: versioning
|
||||||
image: node:12
|
image: node:12
|
||||||
commands:
|
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:]]')
|
|
||||||
- echo $PACKAGE_VERSION
|
|
||||||
- echo $LATEST_VERSION
|
|
||||||
- echo $DRONE_BUILD_CREATED
|
- echo $DRONE_BUILD_CREATED
|
||||||
- git config --global user.email "${DRONE_COMMIT_AUTHOR_EMAIL}"
|
- git config --global user.email "${DRONE_COMMIT_AUTHOR_EMAIL}"
|
||||||
- git config --global user.name "${DRONE_COMMIT_AUTHOR}"
|
- git config --global user.name "${DRONE_COMMIT_AUTHOR}"
|
||||||
- if [ "${PACKAGE_VERSION}" != "${LATEST_VERSION}" ]; \
|
- git commit -A -m "Drone tagged as ${DRONE_TAG}"
|
||||||
then \
|
- git tag "${DRONE_TAG}"
|
||||||
git tag "$PACKAGE_VERSION" \
|
- git push https://$GIT_USER:$GIT_PASSWORD@gitea.frontblock.me/fw-docs/${DRONE_REPO_NAME}.git master ${DRONE_TAG}
|
||||||
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
|
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
GIT_USER:
|
GIT_USER:
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
# Documentation
|
# Documentation
|
||||||
docs [https://gitea.frontblock.me/fw-vendor/rpclibrary/src/branch/master/docs/README.md]
|
generated Documentation [https://gitea.frontblock.me/fw-vendor/rpclibrary/src/branch/master/docs/globals.md]
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
[rpclibrary](README.md) › [Globals](globals.md)
|
|
||||||
|
|
||||||
# rpclibrary
|
|
||||||
|
|
||||||
# Documentation
|
|
||||||
docs [https://gitea.frontblock.me/fw-vendor/rpclibrary/src/branch/master/docs/README.md]
|
|
||||||
Reference in New Issue
Block a user