Skip to content

Instantly share code, notes, and snippets.

@pmlopes
Created October 9, 2015 10:05
Show Gist options
  • Save pmlopes/deb38717bbf92440000c to your computer and use it in GitHub Desktop.
Save pmlopes/deb38717bbf92440000c to your computer and use it in GitHub Desktop.
Release Vert.x 3.x with support from git-flow
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.vertx</groupId>
<artifactId>vertx-release</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<!-- only include product stack -->
<modules>
<!-- BUILD -->
<module>modules/vertx-codegen</module>
<module>modules/vertx-codetrans</module>
<module>modules/vertx-docgen</module>
<!-- CORE -->
<module>modules/vert.x</module>
<!-- WEB -->
<module>modules/vertx-web</module>
<!-- DATA -->
<module>modules/vertx-sql-common</module>
<module>modules/vertx-mongo-client</module>
<module>modules/vertx-jdbc-client</module>
<module>modules/vertx-redis-client</module>
<!-- AUTH -->
<module>modules/vertx-auth</module>
<!-- REACTIVE -->
<module>modules/vertx-sync</module>
<module>modules/vertx-rx</module>
<!-- INTEGRATION -->
<module>modules/vertx-jca</module>
<module>modules/vertx-stomp</module>
<module>modules/vertx-mail-client</module>
<!--&lt;!&ndash; METRICS &ndash;&gt;-->
<!--<module>modules/vertx-dropwizard-metrics</module>-->
<!-- TESTING -->
<module>modules/vertx-unit</module>
<!--&lt;!&ndash; CLUSTERING &ndash;&gt;-->
<!--<module>modules/vertx-hazelcast</module>-->
<!--<module>modules/vertx-jgroups</module>-->
<!-- LANGUAGE SUPPORT -->
<module>modules/vertx-lang-js</module>
<module>modules/vertx-lang-groovy</module>
<module>modules/vertx-lang-ruby</module>
<!--&lt;!&ndash; OTHERS &ndash;&gt;-->
<!--<module>modules/vertx-embedded-mongo-db</module>-->
<!--<module>modules/vertx-reactive-streams</module>-->
<!--<module>modules/vertx-service-factory</module>-->
<!--<module>modules/vertx-service-proxy</module>-->
<!--<module>modules/vertx-maven-service-factory</module>-->
<!--<module>modules/vertx-http-service-factory</module>-->
<!--<module>modules/vertx-shell</module>-->
</modules>
</project>
#!/usr/bin/env bash
set -e
if [ -z "$1" ]; then
echo "usage: $0 VERSION NEXT_VERSION"
exit 1
fi
if [ -z "$2" ]; then
echo "usage: $0 VERSION NEXT_VERSION"
exit 1
fi
components=(
# Tools
"vert-x3/vertx-codegen"
"vert-x3/vertx-docgen"
"vert-x3/vertx-codetrans"
# Vert.x
"eclipse/vert.x"
# Web
"vert-x3/vertx-web"
# DB
"vert-x3/vertx-sql-common"
"vert-x3/vertx-jdbc-client"
"vert-x3/vertx-mongo-client"
"vert-x3/vertx-redis-client"
# Security
"vert-x3/vertx-auth"
# Reactive
"vert-x3/vertx-sync"
"vert-x3/vertx-rx"
# Integration
"vert-x3/vertx-stomp"
"vert-x3/vertx-jca"
"vert-x3/vertx-mail-client"
# Testing
"vert-x3/vertx-unit"
# Clustering
"vert-x3/vertx-jgroups"
# Lang
"vert-x3/vertx-lang-js"
"vert-x3/vertx-lang-groovy"
"vert-x3/vertx-lang-ruby"
)
# prepare
for i in "${components[@]}"
do
if [ -d modules/$(basename $i) ]; then
rm modules/$(basename $i)
fi
git clone --depth 1 [email protected]:${i}.git modules/$(basename $i)
cd modules/$(basename $i)
# setup
git flow init -fd
# start a release flow
git flow release start $1
# set version on poms (plugin 2.2 does not work)
mvn org.codehaus.mojo:versions-maven-plugin:2.1:set -DnewVersion==$1
# save the new version
git commit -a -m "Prepare release $1"
cd ../..
done
# make the build and upload artifacts
mvn clean verify
mvn deploy -Psonatype-oss-release -Dgpg.passphrase="my pass phrase" -Ddependency.locations.enabled=false -DskipTests
# finish
for i in "${components[@]}"
do
cd modules/$(basename $i)
# finish a release flow
git flow release finish $1
# push tags
git push --tags
cd ../..
done
# next development cicle
for i in "${components[@]}"
do
cd modules/$(basename $i)
# set version on poms (plugin 2.2 does not work)
mvn org.codehaus.mojo:versions-maven-plugin:2.1:set -DnewVersion==$2
# save the new version
git commit -a -m "Next iteration $1"
cd ../..
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment