Skip to content

Commit

Permalink
normalize build step names and add VERSION to package
Browse files Browse the repository at this point in the history
  • Loading branch information
k-anderson committed Oct 10, 2019
1 parent 86bf253 commit fa5f214
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
steps:
- checkout
- run:
name: Getting base branch
name: Setting up core repository
command: |
BAZE="$(cat "${HOME}/2600hz/the_app/.base_branch")"
if [ -n "$BAZE" ]; then
Expand All @@ -44,37 +44,40 @@ jobs:
exit 1
fi
- run:
name: Setting up Directories
name: Generating build environment variables
command: |
APP=${CIRCLE_PROJECT_REPONAME#monster-ui-}
echo -e "export MONSTER_APP=${APP}\n" >> $BASH_ENV
echo -e "export APP=${APP}\n" >> $BASH_ENV
echo -e "export MONSTER_ROOT=${HOME}/2600hz/monster-ui" >> $BASH_ENV
echo -e "export APP_PATH=src/apps/${APP}\n\n" >> $BASH_ENV
- run:
name: Verify directories
name: Displaying environment information
command: |
echo ":: behold, running ci tests for application: $MONSTER_APP"
echo "MONSTER_ROOT: $MONSTER_ROOT"
echo "APP_PATH: $APP_PATH"
echo "BASE_BRANCH: $BASE_BRANCH"
- run:
name: Cloning core repository
command: |
if [ ! -d ${MONSTER_ROOT} ]; then
git clone https://github.com/2600hz/monster-ui $MONSTER_ROOT
fi
- run:
name: Running base setup script
name: Running core setup script
command: ${MONSTER_ROOT}/scripts/circleci.bash
- restore_cache:
key: dependency-cache-centos-{{ checksum "/home/circleci/2600hz/monster-ui/package-lock.json" }}
paths:
-/home/circle/2600hz/monster-ui/node_modules
- run:
name: Install dependencies from package.json
name: Making dependencies
command: |
cd $MONSTER_ROOT
npm install
- run:
name: Run a production build
name: Building release
command: |
cd $MONSTER_ROOT
gulp build-app --app=${APP}
Expand All @@ -92,14 +95,17 @@ jobs:
echo "export PACKAGE_NAME=${PACKAGE_NAME}" >> $BASH_ENV
echo "build version for ${PACKAGE_NAME} version: ${VERSION} release: ${RELEASE}"
- run:
name: Preparing source
command: |
name: Building CHANGELOG and VERSION files
command: |
cd $BUILD_ROOT
./package_docs
- run:
name: Preparing source for packaging
command: |
cd $BUILD_SOURCES
echo " - copy build into artifacts"
cp -R ${MONSTER_ROOT}/dist/apps/${MONSTER_APP} ${BUILD_SOURCES}/
echo " - generate build version and changelog"
cp VERSION ${MONSTER_APP}/
echo " - removing files that should not be packaged in the source tar"
rm -rf ${BUILD_SOURCES}/.??*
rm -rf ${BUILD_SOURCES}/doc*
Expand All @@ -111,7 +117,6 @@ jobs:
cp -r ${BUILD_SOURCES}/* ${ARTIFACTS_NAME}/.
tar -cf ${ARTIFACTS_NAME}.tar ${ARTIFACTS_NAME}
cp ${ARTIFACTS_NAME}.tar ${BUILD_SOURCES}/.
- run:
name: Building package
command: |
Expand Down

0 comments on commit fa5f214

Please sign in to comment.