Skip to content

Commit

Permalink
[extra] deploy: support groups
Browse files Browse the repository at this point in the history
Signed-off-by: Eugenio Paolantonio (g7) <[email protected]>
  • Loading branch information
g7 committed Dec 1, 2024
1 parent ec2ed62 commit 3aa1c8f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions extra/repo-droidian-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ if [ "${CIRCLECI}" == "true" ]; then

BRANCH="${CIRCLE_BRANCH}"
COMMIT="${CIRCLE_SHA1}"
NAMESPACE="${CIRCLE_PROJECT_USERNAME}"
PROJECT_SLUG="${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}"
if [ -n "${CIRCLE_TAG}" ]; then
TAG="${CIRCLE_TAG}"
Expand Down Expand Up @@ -37,6 +38,13 @@ echo "Determining target"
if [ -n "${TAG}" ]; then
# Tag, should go to production
TARGET="production"
elif [[ ${BRANCH} = feature/group/* ]]; then
# Group
_branch=${BRANCH/feature\/group\//}
_branch=${_branch//./-}
_branch=${_branch//_/-}
_branch=${_branch//\//-}
TARGET=$(echo ${NAMESPACE}-${_branch} | tr '[:upper:]' '[:lower:]')
elif [[ ${BRANCH} = feature/* ]]; then
# Feature branch
_project=${PROJECT_SLUG//\//-}
Expand Down

0 comments on commit 3aa1c8f

Please sign in to comment.