message: fix mac build script
diff: @@ -15,7 +15,16 @@ if ! [ -x "$(command -v /usr/local/bin/packagesbuild)" ]; then
  exit 1
  fi
  -nvm use default
  +if ! [ -x "$(command -v gulp)" ]; then
  + echo 'Gulp does not exist! Install it for setting expiry!' >&2
  + exit 1
  +fi
  +
  +if [ -z "$PARENT_BUILD_VERSION" ]; then
  + echo "PARENT_BUILD_VERSION is empty, setting default"
  + PARENT_BUILD_VERSION="0"
  +fi
  +
  NODE_VERSION=$(node --version)
  echo "Node Version: ${NODE_VERSION}"
  @@ -40,6 +49,12 @@ sed -i -e "s/\"buildNumber\"[[:space:]]*\:[[:space:]]*\".*\"/\"buildNumber\":\"$
  echo "Setting package version in pre install script to ${PKG_VERSION}"
  sed -i -e "s/CURRENT_VERSION=APP_VERSION/CURRENT_VERSION=${PKG_VERSION}/g" ./installer/mac/preinstall.sh
  +if [ -z "$EXPIRY_PERIOD" ]; then
  + echo 'Expiry period not set, so, not creating expiry for the build'
  +else
  + gulp setExpiry --period ${EXPIRY_PERIOD}
  +fi
  +
  echo "Running tests, code coverage, linting and building..."
  npm run unpacked-mac
  