aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/jenkins/master.sh
blob: 93af4d941eb6b966cf2400f11554860b1d302cf3 (plain)
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
#!/bin/bash

echo "#################################"
echo "#### Update master ##############"
echo "#################################"

ARG_DEFS=(
  "[--no-test=(true|false)]"
)

function build {
  cd ../..

  if [[ $NO_TEST == "true" ]]; then
    npm install --color false
    grunt ci-checks package --no-color
  else
    ./jenkins_build.sh
  fi

  cd $SCRIPT_DIR
}

function phase {
  ../code.angularjs.org/publish.sh --action=$1
  ../bower/publish.sh --action=$1
}

function run {
  build

  # First prepare all scripts (build, test, commit, tag, ...),
  # so we are sure everything is all right
  phase prepare
  # only then publish to github
  phase publish
}

source $(dirname $0)/../utils.inc