#!/bin/bash # Create folders based on branch for publishing debian packages using git-flow # The master branch is linked to the debian testing repository # The develop branch is linked to the debian development repository # build/dist/{development,master,acceptation,production} ## DIST_PATH="./build/dist" component="${BRANCH_NAME}" [[ "${component}" == "master" ]] && component="testing"; [[ "${component}" == "develop" ]] && component="development"; if [[ "${component}" == "development" || "${component}" == "testing" || "${component}" == "acceptation" || "${component}" == "production" ]]; then echo "Creating dist package for component: '${component}'" mkdir -p ${DIST_PATH}/${component} cp build/Release/*.deb ${DIST_PATH}/${component}/ else echo "NO dist package for component: '${component}'" fi