Browse Source

Generated a bunch of scripts for managing releases.

master
Drew Short 11 years ago
parent
commit
a49f84ff14
  1. 2
      DEVLOPMENT.md
  2. 18
      changeTagToDev.sh
  3. 18
      changeTagToFinal.sh
  4. 26
      changeTagToMilestone.sh
  5. 18
      changeTagToSnapshot.sh
  6. 5
      createBuildRelease.sh
  7. 30
      createMajorRelease.sh
  8. 30
      createMinorRelease.sh
  9. 6
      createPatchRelease.sh
  10. 5
      createTestRelease.sh

2
DEVLOPMENT.md

@ -47,5 +47,5 @@ Image Tools is a mixed language project. Java provides the interface code and su
Limited samples should be included in version control and ideally none should be included as they massively increase the repository size. Instead all samples required to run the tests should be provided as a seperate package to be downloaded by the developer for inclusion before running the tests.
Image Tools uses the Semantic Versioning scheme to represent changes within the code base. The initial version committed was v0.1.0-DEV. Tagged versions should follow this scheme. In addition to Semantic Versioning the follwing tags are used. DEV (indicates a development version, very unstable, may not pass all tests), SNAPSHOT (unstable versions, passes all tests but not all features may be ready fore release), M{number} i.e. M1 (sequential milestone release for a specific version number. This build is 'expected' to be stable, but may not be completely stable. All tests pass and are consistent on known platforms.), FINAL (last supported version of a major.minor pair. No more updates will be released along this line and upgrading to a newer major.minor pair is advised. Typically used when deprecated functionality is cut off.) If no tag is included it is safe to assume it is a production version and has made it out of milestone , but has not yet reached FINAL so more revision changes may occur as bugs are fixed.
Image Tools uses the Semantic Versioning scheme to represent changes within the code base. The initial version committed was v0.1.0-DEV. Tagged versions should follow this scheme. In addition to Semantic Versioning the follwing tags are used. DEV (indicates a development version, very unstable, may not pass all tests), SNAPSHOT (unstable versions, passes all tests but not all features may be ready for release), M{number} i.e. M1 (sequential milestone release for a specific version number. This build is 'expected' to be stable, but may not be completely stable. All tests pass and are consistent on known platforms.), FINAL (last supported version of a major.minor pair. No more updates will be released along this line and upgrading to a newer major.minor pair is advised. Typically used when deprecated functionality is cut off.) If no tag is included it is safe to assume it is a production version and has made it out of milestone , but has not yet reached FINAL so more revision changes may occur as bugs are fixed.

18
changeTagToDev.sh

@ -0,0 +1,18 @@
#!/bin/bash
#Update the release version of the project
#version string will look similar to this: 0.1.0-DEV-27-060aec7
VERSION=$(head -1 ./version.info)
#do work on the version to get the correct info
#we need the version string from above to look like this: 0.1.1-DEV
IFS='.' read -a arr <<< "$VERSION"
#results in [0,1,0-DEV-27-060aec7]
IFS='-' read -a arr2 <<< "${arr[2]}"
#results in [0,DEV,27,060aec7]
VERSION="${arr[0]}.${arr[1]}.${arr2[0]}-DEV"
#echo $VERSION
#update the POM
mvn versions:set -DnewVersion=$VERSION
echo "$VERSION" > version.info

18
changeTagToFinal.sh

@ -0,0 +1,18 @@
#!/bin/bash
#Update the release version of the project
#version string will look similar to this: 0.1.0-DEV-27-060aec7
VERSION=$(head -1 ./version.info)
#do work on the version to get the correct info
#we need the version string from above to look like this: 0.1.1-DEV
IFS='.' read -a arr <<< "$VERSION"
#results in [0,1,0-DEV-27-060aec7]
IFS='-' read -a arr2 <<< "${arr[2]}"
#results in [0,DEV,27,060aec7]
VERSION="${arr[0]}.${arr[1]}.${arr2[0]}-DEV"
#echo $VERSION
#update the POM
mvn versions:set -DnewVersion=$VERSION
echo "$VERSION" > version.info

26
changeTagToMilestone.sh

@ -0,0 +1,26 @@
#!/bin/bash
#Update the release version of the project
#version string will look similar to this: 0.1.0-DEV-27-060aec7
VERSION=$(head -1 ./version.info)
#do work on the version to get the correct info
#we need the version string from above to look like this: 0.1.1-DEV
IFS='.' read -a arr <<< "$VERSION"
#results in [0,1,0-DEV-27-060aec7]
IFS='-' read -a arr2 <<< "${arr[2]}"
#results in [0,DEV,27,060aec7]
MVERSIONTEMP=0
#determine the milestone version
if [ "${arr2[1]:0:1}" = "M" ]
then
MVERSIONTEMP=${arr2[1]:1}
fi
#increment the milestone vesrion
let MVERSION=${MVERSIONTEMP}+1
VERSION="${arr[0]}.${arr[1]}.${arr2[0]}-M$MVERSION"
echo $VERSION
#update the POM
mvn versions:set -DnewVersion=$VERSION
echo "$VERSION" > version.info

18
changeTagToSnapshot.sh

@ -0,0 +1,18 @@
#!/bin/bash
#Update the release version of the project
#version string will look similar to this: 0.1.0-DEV-27-060aec7
VERSION=$(head -1 ./version.info)
#do work on the version to get the correct info
#we need the version string from above to look like this: 0.1.1-DEV
IFS='.' read -a arr <<< "$VERSION"
#results in [0,1,0-DEV-27-060aec7]
IFS='-' read -a arr2 <<< "${arr[2]}"
#results in [0,DEV,27,060aec7]
VERSION="${arr[0]}.${arr[1]}.${arr2[0]}-SNAPSHOT"
#echo $VERSION
#update the POM
mvn versions:set -DnewVersion=$VERSION
echo "$VERSION" > version.info

5
createBuildRelease.sh

@ -0,0 +1,5 @@
#!/bin/bash
#Do not change versions as this is a build release with artifacts
#Build and package the current version
. build.sh
. package.sh

30
createMajorRelease.sh

@ -0,0 +1,30 @@
#!/bin/bash
#Update the release version of the project
#version string will look similar to this: 0.1.0-DEV-27-060aec7
VERSION=$(head -1 ./version.info)
#do work on the version to get the correct info
#we need the version string from above to look like this: 0.1.1-DEV
IFS='.' read -a arr <<< "$VERSION"
#results in [0,1,0-DEV-27-060aec7]
IFS='-' read -a arr2 <<< "${arr[2]}"
#results in [0,DEV,27,060aec7]
let major=${arr[0]}+1
#echo $major
VERSION="$major.0.0-${arr2[1]}"
#echo $VERSION
#update the POM
mvn versions:set -DnewVersion=$VERSION
#commit the new patch version
git commit -a . -m "Creating major version $VERSION"
#tag the build
git tag -a v$VERSION -m "Major Release Version $VERSION"
#push the build and tag
git push --follow-tags
. build.sh
. package.sh

30
createMinorRelease.sh

@ -0,0 +1,30 @@
#!/bin/bash
#Update the release version of the project
#version string will look similar to this: 0.1.0-DEV-27-060aec7
VERSION=$(head -1 ./version.info)
#do work on the version to get the correct info
#we need the version string from above to look like this: 0.1.1-DEV
IFS='.' read -a arr <<< "$VERSION"
#results in [0,1,0-DEV-27-060aec7]
IFS='-' read -a arr2 <<< "${arr[2]}"
#results in [0,DEV,27,060aec7]
let minor=${arr[1]}+1
#echo $minor
VERSION="${arr[0]}.$minor.0-${arr2[1]}"
#echo $VERSION
#update the POM
mvn versions:set -DnewVersion=$VERSION
#commit the new patch version
git commit -a . -m "Creating minor version $VERSION"
#tag the build
git tag -a v$VERSION -m "Minor Release Version $VERSION"
#push the build and tag
git push --follow-tags
. build.sh
. package.sh

6
createPatchRelease.sh

@ -17,8 +17,14 @@ VERSION="${arr[0]}.${arr[1]}.$patch-${arr2[1]}"
#update the POM
mvn versions:set -DnewVersion=$VERSION
#commit the new patch version
git commit -a . -m "Creating patch version $VERSION"
#tag the build
git tag -a v$VERSION -m "Patch Release Version $VERSION"
#push the build and tag
git push --follow-tags
. build.sh
. package.sh

5
createTestRelease.sh

@ -1,5 +0,0 @@
#!/bin/bash
#Do not change versions as this is a test build with artifacts
#Build and package the current version
. build.sh
. package.sh
Loading…
Cancel
Save