aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/editions.sh
blob: ce8d0d07fe6c6c87053ba5ca840bebc87dc10115 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash

set -euo pipefail

DEFAULT_EDITION="community"
EDITIONS="community"

toLower() {
  echo "$1" | tr '[:upper:]' '[:lower:]'
}

checkEdition() {
  for t in $EDITIONS; do
    if [ "$1" = "$t" ]; then
      return
    fi
  done

  echo "Unsupported edition $1"
  exit 1
}


resolveAliases() {
  local lowerEditionAlias=$(toLower "$1")

  case "$lowerEditionAlias" in
    oss )
      echo community ;;
    * )
      echo "$lowerEditionAlias" ;;
  esac
}

distributionDirOf() {
  echo "sonar-application/build/distributions/"
}

baseFileNameOf() {
  echo "sonar-application"
}