found bug if repo is empty

This commit is contained in:
Daniel Huebleitner
2019-10-29 20:48:04 +01:00
parent 45d6bb9062
commit 348819d552
+2 -2
View File
@@ -52,10 +52,10 @@ steps:
image: node:12
commands:
- echo ${DRONE_BUILD_CREATED}
- git clone https://www.versioncontrol.me/frontwork-documentation/${DRONE_REPO_NAME}.git && cd ${DRONE_REPO_NAME} && rm -rf ./*; cp -r ../docs/* .
- git clone https://www.versioncontrol.me/frontwork-documentation/${DRONE_REPO_NAME}.git; cd ${DRONE_REPO_NAME} && rm -rf ./*; cp -r ../docs/* .
- sed -i '1,3d; $d' README.md && echo "### Version\n\n${DRONE_TAG}\n" >> ./README.md
- sed -i -e 1,4d ./globals.md && cat ./globals.md >> ./README.md
- git -c user.email="${DRONE_COMMIT_AUTHOR_EMAIL}" -c user.name="${DRONE_COMMIT_AUTHOR}" commit --all --allow-empty --message "generated from tag ${DRONE_TAG}"
- git add --all; git -c user.email="${DRONE_COMMIT_AUTHOR_EMAIL}" -c user.name="${DRONE_COMMIT_AUTHOR}" commit --all --allow-empty --message "generated from tag ${DRONE_TAG}"
- git tag ${DRONE_TAG} && git push --force origin master ${DRONE_TAG}
environment:
GIT_USER: