Project

General

Profile

Download (1.14 KB) Statistics
| Branch: | Tag: | Revision:
1 03e53b89 Andreas Kohlbecker
#!/bin/bash
2
3
###############################################################################
4
#
5
# Performes preparation tasks for the release of the cdm-dataportal project:
6
# 
7
# 1. compile the SASS code to css without development features
8 a283892e Andreas Kohlbecker
# 2. commit and push the the production level css
9 03e53b89 Andreas Kohlbecker
#
10
###############################################################################
11
12
13
14
if [ -z "$1" ]; then
15
	echo "version parameter missing\nUsage: deploy.sh <version-number>"
16
  exit -1
17
fi
18
VERSION=$1
19
20
# $WORKSPACE is an environment variable set by jenkins
21
if [ -z "$WORKSPACE" ]; then
22
  echo "ERROR: environment variable WORKSPACE should be set by jenkins but is missing."
23
  exit -1
24
fi
25
26
27
#
28
# compile the sass files to css in the zen_dataportal theme
29
# this will create the versions needed for production
30
#
31 66cea767 Andreas Kohlbecker
32
git checkout release/$VERSION
33 10478240 Andreas Kohlbecker
git pull --rebase origin release/$VERSION
34 66cea767 Andreas Kohlbecker
35
compass clean $WORKSPACE/themes/zen_dataportal/
36
compass compile $WORKSPACE/themes/zen_dataportal/
37
38 a283892e Andreas Kohlbecker
git add -A $WORKSPACE/themes/zen_dataportal/css/
39
git commit -m "release-preparation: production level css"
40
41 66cea767 Andreas Kohlbecker
git push origin release/$VERSION
42
43 03e53b89 Andreas Kohlbecker
44
echo "cdm_dataportal release preparation done!"
45
46
47
48
49
50
51
52
53