Project

General

Profile

Download (1.21 KB) Statistics
| Branch: | Tag: | Revision:
1
#!/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
# 2. commit and push the the production ready css
9
#
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
if [ -x "$COMPASS" ]; then 
32
  
33
  git checkout release/$VERSION
34
  git pull --rebase
35

    
36
  $COMPASS clean $WORKSPACE/themes/zen_dataportal/
37
  $COMPASS compile $WORKSPACE/themes/zen_dataportal/
38
  
39
  git push origin release/$VERSION
40
  
41
else 
42
  echo "ERROR on sass compilation since the evnvironment variable COMPASS is either missing or not the file "$COMPASS" is not executable."
43
  exit 1
44
fi
45

    
46
echo "cdm_dataportal release preparation done!"
47

    
48

    
49

    
50

    
51

    
52

    
53

    
54

    
55

    
56

    
(4-4/4)