forked from Louvorg/ReaderForSelfoss-multiplatform
Version scripts.
This commit is contained in:
@ -1,31 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
git fetch --tags -p
|
||||
|
||||
BASE_VERSION="1.7"
|
||||
LAST_TAG=$(git tag -l | sort -V | tail -1)
|
||||
|
||||
INITIAL_VERSION="${BASE_VERSION//./}$(date '+%y%m%j')"
|
||||
|
||||
LAST_DAY_VERSION=$(echo $LAST_TAG | sed "s/v${INITIAL_VERSION}//")
|
||||
LAST_DAY_VERSION_LENGTH=$(echo "${#LAST_DAY_VERSION}")
|
||||
|
||||
if [[ "$LAST_DAY_VERSION_LENGTH" == "1" ]]
|
||||
then
|
||||
TODAYS_VERSION=$(( $LAST_DAY_VERSION + 1 ))
|
||||
else
|
||||
TODAYS_VERSION="1"
|
||||
fi
|
||||
|
||||
VERSION="${INITIAL_VERSION}${TODAYS_VERSION}"
|
||||
|
||||
PARAMS_EXCEPT_PUBLISH=$(echo $1 | sed 's/\-\-publish//')
|
||||
|
||||
./version.sh ${VERSION} ${PARAMS_EXCEPT_PUBLISH}
|
||||
|
||||
if [[ "$@" == *'--publish'* ]]
|
||||
then
|
||||
./publish-version.sh ${VERSION}
|
||||
else
|
||||
echo "Did not publish. If you wanted to do so, call the script with \"--publish\" or \"--publish-local\"."
|
||||
fi
|
@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# NOTE: This is copy/pasted in jenkins
|
||||
|
||||
rm -f version.txt
|
||||
printf "versionName=$1-github\nversionCode=$1" >> version.txt
|
||||
|
||||
# You'll need to change server as your server and define a VERSION_PATH.
|
||||
scp version.txt server:$VERSION_PATH
|
||||
|
||||
rm version.txt
|
@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
# You can pass --force as first parameter to force push and tag creation.
|
||||
|
||||
echo "Creating tag $@"
|
||||
|
||||
TAG="v$@"
|
||||
git tag ${TAG}
|
||||
|
||||
echo "Pushing tag"
|
||||
|
||||
git push origin ${TAG}
|
Reference in New Issue
Block a user