Author: ctubbsii Date: Sat May 18 19:53:47 2013 New Revision: 1484170 URL: http://svn.apache.org/r1484170 Log: ACCUMULO-1430 run tests during release:prepare
Modified: accumulo/branches/1.5/assemble/build.sh accumulo/branches/1.5/pom.xml Modified: accumulo/branches/1.5/assemble/build.sh URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/assemble/build.sh?rev=1484170&r1=1484169&r2=1484170&view=diff ============================================================================== --- accumulo/branches/1.5/assemble/build.sh (original) +++ accumulo/branches/1.5/assemble/build.sh Sat May 18 19:53:47 2013 @@ -38,48 +38,44 @@ runAt() { ( cd $1 ; echo in `pwd`; shift ; run $@ ) || fail } -# Allow skipping tests; This option is not possible -# with the --create-release-candidate option -if [[ $1 != '--skipTests' ]]; then - # Run all tests with Hadoop 1.0.x - run mvn clean - run mvn verify +cacheGPG() { + # make sure gpg agent has key cached + # TODO prompt for key instead of using default? + TESTFILE="/tmp/${USER}-gpgTestFile-$(date -u +%s).txt" + touch "${TESTFILE}" && gpg --sign "${TESTFILE}" && rm -f "${TESTFILE}" "${TESTFILE}.gpg" +} - # Run all tests with Hadoop 2.0.x - run mvn clean - run mvn verify -Dhadoop.profile=2.0 -fi +setupRPM() { + # if you want the RPM signed, copy contrib/dotfile-rpmmacros to $HOME/.rpmmacros + diff -q "contrib/dotfile-rpmmacros" "$HOME/.rpmmacros" + R=$? + if [[ $R = 0 ]]; then + true + elif [[ $R = 1 ]]; then + run mv -n "$HOME/.rpmmacros" "$HOME/.rpmmacros-bak-$(date -u +%s)" + run cp "contrib/dotfile-rpmmacros" "$HOME/.rpmmacros" + elif [[ ! -r "$HOME/.rpmmacros" ]]; then + run cp "contrib/dotfile-rpmmacros" "$HOME/.rpmmacros" + else + fail diff returned $R + fi +} -# Build and stage release artifacts; dryRun is assumed, unless -# this script is executed with --create-release-candidate flag. -DRYRUN='-DdryRun' if [[ $1 = '--create-release-candidate' ]]; then - DRYRUN='' -fi - -# make sure gpg agent has key cached; TODO prompt for key instead of using default -# if you want the RPM signed, copy contrib/dotfiles-rpmmacros to $HOME/.rpmmacros -TESTFILE=/tmp/${USER}-gpgTestFile.txt -touch "${TESTFILE}" && gpg --sign "${TESTFILE}" && rm -f "${TESTFILE}" "${TESTFILE}.gpg" - -run mvn clean release:clean release:prepare $DRYRUN -run mvn release:perform $DRYRUN - -if [[ $DRYRUN = '-DdryRun' ]]; then - echo '**************************************************' - echo ' You performed a dryRun release. To tag and' - echo ' stage a real release candidate for a vote,' - echo ' execute this script as:' - echo " $0 --create-release-candidate" - echo '**************************************************' + cacheGPG; setupRPM + # create a release candidate from a branch + run mvn clean release:clean release:prepare release:perform +elif [[ $1 = '--seal-jars' ]]; then + cacheGPG; setupRPM + # build a tag, but with sealed jars + run mvn clean compile javadoc:aggregate install \ + -P apache-release,seal-jars,check-licenses,thrift,native,assemble,docs,rpm,deb +elif [[ $1 = '--test' ]]; then + cacheGPG; setupRPM + # build a tag, but with tests + run mvn clean compile javadoc:aggregate install \ + -P apache-release,check-licenses,thrift,native,assemble,docs,rpm,deb else - echo '**************************************************' - echo ' You\'ve successfully tagged and staged a' - echo ' release candidate. If the vote succeeds, rename' - echo ' the release candidate to its final name,' - echo ' promote the staging repository, copy the' - echo ' artifacts to the dist svn, update the web page,' - echo ' and create a release announcement for the' - echo ' mailing lists.' - echo '**************************************************' + fail "Missing one of: --create-release-candidate, --test, --seal-jars" fi + Modified: accumulo/branches/1.5/pom.xml URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/pom.xml?rev=1484170&r1=1484169&r2=1484170&view=diff ============================================================================== --- accumulo/branches/1.5/pom.xml (original) +++ accumulo/branches/1.5/pom.xml Sat May 18 19:53:47 2013 @@ -422,11 +422,12 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <configuration> - <arguments>-P apache-release,seal-jars,check-licenses,thrift,native,assemble,docs,rpm,deb</arguments> + <arguments>-P apache-release,check-licenses,thrift,native,assemble,docs,rpm,deb</arguments> <autoVersionSubmodules>true</autoVersionSubmodules> <goals>clean compile javadoc:aggregate deploy</goals> <preparationGoals>clean compile javadoc:aggregate verify</preparationGoals> <tagNameFormat>@{project.version}-RC</tagNameFormat> + <releaseProfiles>seal-jars</releaseProfiles> <useReleaseProfile>false</useReleaseProfile> </configuration> </plugin>