Project

General

Profile

Download (1.14 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 level 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

    
32
git checkout release/$VERSION
33
git pull --rebase origin release/$VERSION
34

    
35
compass clean $WORKSPACE/themes/zen_dataportal/
36
compass compile $WORKSPACE/themes/zen_dataportal/
37

    
38
git add -A $WORKSPACE/themes/zen_dataportal/css/
39
git commit -m "release-preparation: production level css"
40

    
41
git push origin release/$VERSION
42

    
43

    
44
echo "cdm_dataportal release preparation done!"
45

    
46

    
47

    
48

    
49

    
50

    
51

    
52

    
53

    
54

    
(4-4/4)