parent
f0a653c3d0
commit
4e72332211
@ -1 +1 @@
|
||||
VERSION 1.0
|
||||
VERSION 1.2
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
##
|
||||
## Update VERSION 1.4
|
||||
## $1 - Version
|
||||
## Default - current Version value plus one (in minor section)
|
||||
##
|
||||
|
||||
FILE_VERSION="VERSION.md"
|
||||
[[ $1 ]] && VER=$1
|
||||
if [[ -z ${VER} ]] ; then
|
||||
SOURCE_FILE_VERSION=$(find ../ -maxdepth 1 -type f -iname "${FILE_VERSION}" -print -quit)
|
||||
CURRENT=$(cat ${SOURCE_FILE_VERSION} | grep 'VERSION' | cut -d" " -f2)
|
||||
MAJOR=$(echo ${CURRENT} | cut -d. -f1)
|
||||
MINOR=$(echo ${CURRENT} | cut -d. -f2)
|
||||
VER="${MAJOR}.$(echo $((${MINOR} +1)))"
|
||||
fi
|
||||
echo ":: Updated VERSION ${CURRENT} to ${VER}"
|
||||
find ../ -maxdepth 2 -type f -iname "${FILE_VERSION}" -exec echo ":: Insert version in file: {}" \; -exec sed "s/VERSION *[[:digit:]]*.*/VERSION ${VER}/" -i {} \;
|
||||
|
After Width: | Height: | Size: 33 KiB |
Loading…
Reference in new issue