diff options
author | Artur Signell <artur@vaadin.com> | 2015-01-29 20:24:44 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-02-09 13:00:27 +0000 |
commit | cf0a3cba90aa21055b6271d0b52968bc7e6e378d (patch) | |
tree | 32300a9ae16af3a7ecf749779c54d5bfc97baab0 /scripts/validate-archetype-common.sh | |
parent | 96362ac38b7c00eeadac1186c0b716326df4d297 (diff) | |
download | vaadin-framework-cf0a3cba90aa21055b6271d0b52968bc7e6e378d.tar.gz vaadin-framework-cf0a3cba90aa21055b6271d0b52968bc7e6e378d.zip |
Unified archetype scripts and added multimodule test
Change-Id: I6cd7d4ca4a1386920dbe657accd18836a009a11c
Diffstat (limited to 'scripts/validate-archetype-common.sh')
-rwxr-xr-x | scripts/validate-archetype-common.sh | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/scripts/validate-archetype-common.sh b/scripts/validate-archetype-common.sh new file mode 100755 index 0000000000..48aa7b3586 --- /dev/null +++ b/scripts/validate-archetype-common.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +display_usage() { +echo -e "\nUsage:\n$0 <version> <framework staging id> <archetypes staging id> <plugin staging id>\n" +echo -e "Example: 7.3.7 1450 1451 1452" +} + +display_sed() { +echo -e "\nGNU sed was not found. If you are running Linux, ensure you have sed installed an in your PATH\n" +echo -e "If you are running Mac OS X, install gsed and ensure it is in your PATH" +} + +SED=sed +# Ensure we have GNU sed +$SED --version 2>&1|grep "GNU sed" > /dev/null +if [ "$?" != "0" ] +then + # Try gsed + SED=gsed + gsed --version 2>&1|grep "GNU sed" > /dev/null + if [ "$?" != "0" ] + then + display_sed + exit 2 + fi +fi + +# if less than two arguments supplied, display usage +if [ $# -le 3 ] +then + display_usage + exit 1 +fi + + +# check whether user had supplied -h or --help . If yes display usage +if [[ ( $# == "--help") || $# == "-h" ]] +then + display_usage + exit 0 +fi + +ARCHETYPE_GROUP=com.vaadin +ARCHETYPE_VERSION=$1 + +REPOBASE=https://oss.sonatype.org/content/repositories/ +VAADINREPO=$REPOBASE"comvaadin-$2" +ARCHETYPEREPO=$REPOBASE"comvaadin-$3" +PLUGINREPO=$REPOBASE"comvaadin-$4" + +ART=test-$ARCHETYPE_ARTIFACT-$ARCHETYPE_VERSION +ART=`echo $ART|sed "s/\./-/g"` +GROUP=testpkg |