drone-sigh #57
19
.drone.yml
19
.drone.yml
@ -24,6 +24,25 @@ steps:
|
||||
- apt-get update && apt-get install -y git
|
||||
- ./build.sh --publish --from-ci
|
||||
|
||||
- name: git-push
|
||||
image: appleboy/drone-git-push
|
||||
settings:
|
||||
remote: root@aminecmi+giteaadmin@pm.me:Louvorg/ReaderForSelfoss-multiplatform.git
|
||||
followtags: true
|
||||
ssh_key:
|
||||
from_secret: giteaKey
|
||||
|
||||
- name: scpFiles
|
||||
image: appleboy/drone-scp
|
||||
settings:
|
||||
host: amine-louveau.fr
|
||||
username: ubuntu
|
||||
key:
|
||||
from_secret: privateKey
|
||||
port: 22
|
||||
target: /home/ubuntu/
|
||||
source: version.txt
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- promote
|
||||
|
2
build.sh
2
build.sh
@ -21,7 +21,7 @@ VERSION="${INITIAL_VERSION}${TODAYS_VERSION}"
|
||||
|
||||
PARAMS_EXCEPT_PUBLISH=$(echo $1 | sed 's/\-\-publish//')
|
||||
|
||||
./version.sh ${VERSION} ${PARAMS_EXCEPT_PUBLISH}
|
||||
./version.sh ${VERSION} ${PARAMS_EXCEPT_PUBLISH} $@
|
||||
|
||||
if [[ "$@" == *'--publish'* ]]
|
||||
then
|
||||
|
12
version.sh
12
version.sh
@ -4,8 +4,12 @@
|
||||
echo "Creating tag $@"
|
||||
|
||||
TAG="v$@"
|
||||
git tag ${TAG}
|
||||
git tag -a ${TAG}
|
||||
|
||||
echo "Pushing tag"
|
||||
|
||||
git push origin ${TAG}
|
||||
if [[ "$@" == *'--from-ci'* ]]
|
||||
then
|
||||
echo "Tag created. HANDLE IN CI"
|
||||
else
|
||||
echo "Pushing tag"
|
||||
git push origin ${TAG}
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user