File: setup

package info (click to toggle)
ruby-progressbar 1.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 948 kB
  • sloc: ruby: 3,617; sh: 29; makefile: 10
file content (58 lines) | stat: -rwxr-xr-x 1,837 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env bash
# shellcheck disable=SC2037

###
# Install Bundler Source Credentials
#
  declare private_url="$(command chamber show --as-env --files="config/settings/**/*.yml" | grep 'GEMFURY_URL' | perl -p -e 's/GEMFURY_URL="(.*)"/\1/')"
  declare private_token="$(command chamber show --as-env --files="config/settings/**/*.yml" | grep 'GEMFURY_TOKEN' | perl -p -e 's/GEMFURY_TOKEN="(.*)"/\1/')"

  if [ -n "${private_url}" ] && [ -n "${private_token}" ]; then
    bundle config --local "${private_url}" "${private_token}"
  else
    bundle config --delete "${private_url}"
  fi

###
# Install Dependencies
#
  echo 'Installing Ruby Packages...'
  gem install bundler --conservative
  bundle check || bundle install

  gem install rubocop --conservative

  echo 'Installing NPM Packages...'
  command npm install -g "jsonlint" 2> /dev/null
  command npm update  -g "jsonlint" 2> /dev/null

  nodenv rehash 2> /dev/null

###
# Install Project bin Executables
#
  echo 'Installing project binaries...'
  if ! [ -d ".git/shellwreck-verification-dir" ]; then
    mkdir .git/shellwreck-verification-dir
  fi

###
# Add Project Information to the Git Repository
#
  echo 'Installing project configuration into git repo...'
  command git config --replace-all --local project.application-name         'ruby-progressbar'

  command git config --replace-all --local deployment.pipeline              'rubygems'
  command git config --replace-all --local deployment.profile               'jfelchner'

  command git config --replace-all --local workflow.issue-tracker           'github'

###
# Setup Git Hook Templates
#
  gem install overcommit --conservative

  if [ -d "${HOME}/.shellwreck/plugins/git/symlinks/hooks" ]; then
    rm --recursive --force .git/hooks
    ln -s "${HOME}/.shellwreck/plugins/git/symlinks/hooks" .git/hooks
  fi