From 4a9521953392854e0d826dc413be8f81984713f5 Mon Sep 17 00:00:00 2001 From: Drew Short Date: Thu, 24 Apr 2014 09:05:43 -0400 Subject: [PATCH] Moved some build files out of the way, and updated them to account for the directory change. --- build/linux/build.sh | 3 +++ build/linux/buildWithoutTests.sh | 3 +++ build/linux/changeTagToDev.sh | 19 ++++++++++++++++ build/linux/changeTagToFinal.sh | 19 ++++++++++++++++ build/linux/changeTagToMilestone.sh | 27 +++++++++++++++++++++++ build/linux/changeTagToRelease.sh | 19 ++++++++++++++++ build/linux/changeTagToSnapshot.sh | 19 ++++++++++++++++ build/linux/createBuildRelease.sh | 7 ++++++ build/linux/createMajorRelease.sh | 34 +++++++++++++++++++++++++++++ build/linux/createMinorRelease.sh | 34 +++++++++++++++++++++++++++++ build/linux/createPatchRelease.sh | 34 +++++++++++++++++++++++++++++ build/linux/fixJavaFXClasspath.sh | 1 + build/linux/package.sh | 21 ++++++++++++++++++ 13 files changed, 240 insertions(+) create mode 100755 build/linux/build.sh create mode 100755 build/linux/buildWithoutTests.sh create mode 100755 build/linux/changeTagToDev.sh create mode 100755 build/linux/changeTagToFinal.sh create mode 100755 build/linux/changeTagToMilestone.sh create mode 100755 build/linux/changeTagToRelease.sh create mode 100755 build/linux/changeTagToSnapshot.sh create mode 100755 build/linux/createBuildRelease.sh create mode 100755 build/linux/createMajorRelease.sh create mode 100755 build/linux/createMinorRelease.sh create mode 100755 build/linux/createPatchRelease.sh create mode 100755 build/linux/fixJavaFXClasspath.sh create mode 100755 build/linux/package.sh diff --git a/build/linux/build.sh b/build/linux/build.sh new file mode 100755 index 0000000..2384491 --- /dev/null +++ b/build/linux/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash +cd ../.. +mvn clean package diff --git a/build/linux/buildWithoutTests.sh b/build/linux/buildWithoutTests.sh new file mode 100755 index 0000000..2c7e3a8 --- /dev/null +++ b/build/linux/buildWithoutTests.sh @@ -0,0 +1,3 @@ +#!/bin/bash +cd ../.. +mvn -Dmaven.test.skip=true clean package diff --git a/build/linux/changeTagToDev.sh b/build/linux/changeTagToDev.sh new file mode 100755 index 0000000..6a9af64 --- /dev/null +++ b/build/linux/changeTagToDev.sh @@ -0,0 +1,19 @@ +#!/bin/bash +cd ../.. +#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 diff --git a/build/linux/changeTagToFinal.sh b/build/linux/changeTagToFinal.sh new file mode 100755 index 0000000..6a9af64 --- /dev/null +++ b/build/linux/changeTagToFinal.sh @@ -0,0 +1,19 @@ +#!/bin/bash +cd ../.. +#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 diff --git a/build/linux/changeTagToMilestone.sh b/build/linux/changeTagToMilestone.sh new file mode 100755 index 0000000..6b2ce0e --- /dev/null +++ b/build/linux/changeTagToMilestone.sh @@ -0,0 +1,27 @@ +#!/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 diff --git a/build/linux/changeTagToRelease.sh b/build/linux/changeTagToRelease.sh new file mode 100755 index 0000000..e0e2acf --- /dev/null +++ b/build/linux/changeTagToRelease.sh @@ -0,0 +1,19 @@ +#!/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]}-RELEASE" +#echo $VERSION + +#update the POM +mvn versions:set -DnewVersion=$VERSION + +echo "$VERSION" > version.info diff --git a/build/linux/changeTagToSnapshot.sh b/build/linux/changeTagToSnapshot.sh new file mode 100755 index 0000000..224e667 --- /dev/null +++ b/build/linux/changeTagToSnapshot.sh @@ -0,0 +1,19 @@ +#!/bin/bash +cd ../.. +#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 diff --git a/build/linux/createBuildRelease.sh b/build/linux/createBuildRelease.sh new file mode 100755 index 0000000..c776fe7 --- /dev/null +++ b/build/linux/createBuildRelease.sh @@ -0,0 +1,7 @@ +#!/bin/bash +HOME=$PWD +#Do not change versions as this is a build release with artifacts +#Build and package the current version +. build.sh +cd $HOME +. package.sh diff --git a/build/linux/createMajorRelease.sh b/build/linux/createMajorRelease.sh new file mode 100755 index 0000000..b210fd8 --- /dev/null +++ b/build/linux/createMajorRelease.sh @@ -0,0 +1,34 @@ +#!/bin/bash +HOME=$PWD +cd ../.. +#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 + +cd $HOME +. build.sh +cd $HOME +. package.sh diff --git a/build/linux/createMinorRelease.sh b/build/linux/createMinorRelease.sh new file mode 100755 index 0000000..2584bad --- /dev/null +++ b/build/linux/createMinorRelease.sh @@ -0,0 +1,34 @@ +#!/bin/bash +HOME=$PWD +cd ../.. +#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 + +cd $HOME +. build.sh +cd $HOME +. package.sh diff --git a/build/linux/createPatchRelease.sh b/build/linux/createPatchRelease.sh new file mode 100755 index 0000000..27dcc95 --- /dev/null +++ b/build/linux/createPatchRelease.sh @@ -0,0 +1,34 @@ +#!/bin/bash +HOME=$PWD +cd ../.. +#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 patch=${arr2[0]}+1 +#echo $patch +VERSION="${arr[0]}.${arr[1]}.$patch-${arr2[1]}" +#echo $VERSION + +#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 + +cd $HOME +. build.sh +cd $HOME +. package.sh diff --git a/build/linux/fixJavaFXClasspath.sh b/build/linux/fixJavaFXClasspath.sh new file mode 100755 index 0000000..3bff1f6 --- /dev/null +++ b/build/linux/fixJavaFXClasspath.sh @@ -0,0 +1 @@ +sudo mvn com.zenjava:javafx-maven-plugin:2.0:fix-classpath diff --git a/build/linux/package.sh b/build/linux/package.sh new file mode 100755 index 0000000..181fe2e --- /dev/null +++ b/build/linux/package.sh @@ -0,0 +1,21 @@ +#!/bin/bash +#Move out of the build folder +cd ../.. +#Getting variables that are produced by the script +VERSION=$(head -1 ./version.info) +NAME=$(head -1 ./name.info) +PACKAGENAME=$NAME-$VERSION +PACKAGETAR=$PACKAGENAME.tar.gz +PACKAGEZIP=$PACKAGENAME.zip +TARGET=$PWD/target + +#Packaging Jar Distributable +cd target/release/ +echo "creating $PACKAGETAR in $TARGET" +tar -zcvf $TARGET/$PACKAGETAR . +echo "creating $PACKAGEZIP in $TARGET" +zip -r $TARGET/$PACKAGEZIP ./* +#Removing prebuilt jar in target +rm $TARGET/*.jar +#Copying Jar to target for archiving +cp ./*.jar $TARGET