aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/editions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/editions.sh')
-rwxr-xr-xscripts/editions.sh47
1 files changed, 19 insertions, 28 deletions
diff --git a/scripts/editions.sh b/scripts/editions.sh
index 7ccad91acd5..ce8d0d07fe6 100755
--- a/scripts/editions.sh
+++ b/scripts/editions.sh
@@ -2,49 +2,40 @@
set -euo pipefail
-DEFAULT_EDITION="oss"
-EDITIONS="oss"
+DEFAULT_EDITION="community"
+EDITIONS="community"
toLower() {
echo "$1" | tr '[:upper:]' '[:lower:]'
}
-checkEditionArgument() {
- local editionArg="$1"
- local lowerEditionArg=$(toLower $editionArg)
-
- if [ "$lowerEditionArg" = "$DEFAULT_EDITION" ]; then
- return
- fi
-
+checkEdition() {
for t in $EDITIONS; do
- if [ "$lowerEditionArg" = "$t" ]; then
+ if [ "$1" = "$t" ]; then
return
fi
done
- echo "Unsupported edition $editionArg"
+ echo "Unsupported edition $1"
exit 1
}
+
+resolveAliases() {
+ local lowerEditionAlias=$(toLower "$1")
+
+ case "$lowerEditionAlias" in
+ oss )
+ echo community ;;
+ * )
+ echo "$lowerEditionAlias" ;;
+ esac
+}
+
distributionDirOf() {
- local edition="$1"
-
- if [ "$edition" = "oss" ]; then
- echo "sonar-application/build/distributions/"
- else
- echo "unsupported edition $edition"
- exit 1
- fi
+ echo "sonar-application/build/distributions/"
}
baseFileNameOf() {
- local edition="$1"
-
- if [ "$edition" = "oss" ]; then
- echo "sonar-application"
- else
- echo "unsupported edition $edition"
- exit 1
- fi
+ echo "sonar-application"
}