sanger/sequencescape

View on GitHub
compile-build

Summary

Maintainability
Test Coverage
#!/bin/bash
set -e # Exit immediately if something fails
export NODE_ENV=production
export RAILS_ENV=production
export BUILDING_APP=true
export SECRET_KEY_BASE=to_be_replaced
echo 'Compiling assets'
bundle exec rake vite:build
echo 'Generating sha'
echo ${1:-$(git rev-parse HEAD)} > REVISION
echo ${2:-$(git tag -l --points-at HEAD --sort -version:refname | head -1)} > TAG
echo ${3:-$(git rev-parse --abbrev-ref HEAD)} > BRANCH
echo 'Compiling tar.gz'
tar \
  --exclude='./*.swp' \
  --exclude='./.bundle' \
  --exclude='./.codeclimate.yml' \
  --exclude='./.git' \
  --exclude='./.gitignore' \
  --exclude='./.rspec' \
  --exclude='./.rubocop*' \
  --exclude='./.simplecov' \
  --exclude='./.tags' \
  --exclude='./.travis.yml' \
  --exclude='./README*' \
  --exclude='./compile-build' \
  --exclude='./coverage' \
  --exclude='./features' \
  --exclude='./knapsack_cucumber_report.json' \
  --exclude='./log/*' \
  --exclude='./node_modules' \
  --exclude='./sbin' \
  --exclude='./*.sublime-project' \
  --exclude='./spec' \
  --exclude='./test' \
  --exclude='./tmp' \
  --exclude='./vendor/bundle' \
  --exclude='./yarn.lock' \
  --exclude='release.tar.gz' \
  -zcf /tmp/release.tar.gz ./
mv /tmp/release.tar.gz ./release.tar.gz
echo 'Release complete!'
echo `pwd`/release.tar.gz