mirror of
https://github.com/proski/madwifi
synced 2024-11-22 06:21:47 +03:00
* Adjust for repository structure adjustments made in r2721
* Add support for micro releases * Suppress possible but irrelevant error message git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3339 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
parent
8c0469176d
commit
56981e0363
@ -107,7 +107,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# ask developer about the version of the new release
|
# ask developer about the version of the new release
|
||||||
reproot=$(svn info | grep URL | cut -d" " -f2 | cut -d"/" -f1-3)
|
reproot=$(svn info | grep URL | cut -d" " -f2 | cut -d"/" -f1-4)
|
||||||
latest=$(svn list $reproot/tags | grep -e "^release-" | cut -d"-" -f2 | cut -d"/" -f1 | sort | tail -n 1)
|
latest=$(svn list $reproot/tags | grep -e "^release-" | cut -d"-" -f2 | cut -d"/" -f1 | sort | tail -n 1)
|
||||||
|
|
||||||
echo
|
echo
|
||||||
@ -115,11 +115,17 @@ if [[ ! -z "$latest" ]]; then
|
|||||||
major=$(echo $latest | cut -d"." -f1)
|
major=$(echo $latest | cut -d"." -f1)
|
||||||
minor=$(echo $latest | cut -d"." -f2)
|
minor=$(echo $latest | cut -d"." -f2)
|
||||||
point=$(echo $latest | cut -d"." -f3)
|
point=$(echo $latest | cut -d"." -f3)
|
||||||
|
micro=$(echo $latest | cut -d"." -f4)
|
||||||
|
|
||||||
echo "The latest release is: $major.$minor.$point"
|
if [ -n "$micro" ]; then
|
||||||
|
echo "The latest release is: $major.$minor.$point.$micro"
|
||||||
|
else
|
||||||
|
micro="0"
|
||||||
|
echo "The latest release is: $major.$minor.$point"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
latest="0.0.0"
|
latest="0.0.0"
|
||||||
major="0"; minor="0"; point="0"
|
major="0"; minor="0"; point="0"; micro="0"
|
||||||
|
|
||||||
echo "No releases yet."
|
echo "No releases yet."
|
||||||
fi
|
fi
|
||||||
@ -131,25 +137,35 @@ while ! ((valid)); do
|
|||||||
echo " 1: major release (new version will be $((major+1)).0.0)"
|
echo " 1: major release (new version will be $((major+1)).0.0)"
|
||||||
echo " 2: minor release (new version will be $major.$((minor+1)).0)"
|
echo " 2: minor release (new version will be $major.$((minor+1)).0)"
|
||||||
echo " 3: point release (new version will be $major.$minor.$((point+1)))"
|
echo " 3: point release (new version will be $major.$minor.$((point+1)))"
|
||||||
echo " 4: other (enter new version manually)"
|
echo " 4: micro release (new version will be $major.$minor.$point.$((micro+1))"
|
||||||
|
echo " 5: other (enter new version manually)"
|
||||||
echo " 0: abort"
|
echo " 0: abort"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
read -n1 -p "Your choice: " choice
|
read -n1 -p "Your choice: " choice
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
1) newmajor=$((major+1)); newminor=0; newpoint=0; valid=1 ;;
|
1) newmajor=$((major+1)); newminor=0; newpoint=0; newmicro=0; valid=1 ;;
|
||||||
2) newmajor=$major; newminor=$((minor+1)); newpoint=0; valid=1 ;;
|
2) newmajor=$major; newminor=$((minor+1)); newpoint=0; newmicro=0; valid=1 ;;
|
||||||
3) newmajor=$major; newminor=$minor; newpoint=$((point+1)); valid=1 ;;
|
3) newmajor=$major; newminor=$minor; newpoint=$((point+1)); newmicro=0; valid=1 ;;
|
||||||
4)
|
4) newmajor=$major; newminor=$minor; newpoint=$point; newmicro=$((micro+1)); valid=1 ;;
|
||||||
|
5)
|
||||||
echo
|
echo
|
||||||
read -p "Enter release number (x.y.z): " newrelease
|
read -p "Enter release number (a.b.c.d): " newrelease
|
||||||
if [[ "$(echo $newrelease | grep -c '^[0-9]*\.[0-9]*\.[0-9]*$')" == "1" ]]; then
|
if [[ "$(echo $newrelease | grep -c '^[0-9]*\.[0-9]*\.[0-9]*\(\.[0-9]\)\?$')" == "1" ]]; then
|
||||||
newmajor=$(echo $newrelease | cut -d"." -f1)
|
newmajor=$(echo $newrelease | cut -d"." -f1)
|
||||||
newminor=$(echo $newrelease | cut -d"." -f2)
|
newminor=$(echo $newrelease | cut -d"." -f2)
|
||||||
newpoint=$(echo $newrelease | cut -d"." -f3)
|
newpoint=$(echo $newrelease | cut -d"." -f3)
|
||||||
|
newmicro=$(echo $newrelease | cut -d"." -f4)
|
||||||
|
|
||||||
if [[ "$(svn list $reproot/tags | grep -c ^release-$newmajor.$newminor.$newpoint)" != "0" ]]; then
|
if [ -n "$newmicro" ]; then
|
||||||
echo "Release $newmajor.$newminor.$newpoint already exists. Try again."
|
newversion="$newmajor.$newminor.$newpoint.$newmicro"
|
||||||
|
else
|
||||||
|
newversion="$newmajor.$newminor.$newpoint"
|
||||||
|
newmicro="0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$(svn list $reproot/tags | grep -c ^release-$newversion)" != "0" ]]; then
|
||||||
|
echo "Release $newversion already exists. Try again."
|
||||||
else
|
else
|
||||||
valid=1
|
valid=1
|
||||||
fi
|
fi
|
||||||
@ -170,8 +186,17 @@ while ! ((valid)); do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# reassure that everything is correct
|
# reassure that everything is correct
|
||||||
oldrelease="$major.$minor.$point"
|
if [[ "$micro" != "0" ]]; then
|
||||||
newrelease="$newmajor.$newminor.$newpoint"
|
oldrelease="$major.$minor.$point.$micro"
|
||||||
|
else
|
||||||
|
oldrelease="$major.$minor.$point"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$newmicro" != "0" ]]; then
|
||||||
|
newrelease="$newmajor.$newminor.$newpoint.$newmicro"
|
||||||
|
else
|
||||||
|
newrelease="$newmajor.$newminor.$newpoint"
|
||||||
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Last release: $oldrelease"
|
echo "Last release: $oldrelease"
|
||||||
@ -233,7 +258,7 @@ store=$RELEASE_STORE
|
|||||||
}
|
}
|
||||||
|
|
||||||
# remove old directories
|
# remove old directories
|
||||||
rm -r $tmp/madwifi-release/* > /dev/null
|
rm -r $tmp/madwifi-release/* > /dev/null 2>&1
|
||||||
|
|
||||||
# create tarball
|
# create tarball
|
||||||
echo "exporting new release from repository..."
|
echo "exporting new release from repository..."
|
||||||
|
Loading…
Reference in New Issue
Block a user