ソースを参照

./release.sh this will now automatically work out the type of release based on the current directory. (trunk, tag or branch)


git-svn-id: http://svn.dmdirc.com/trunk@2807 00569f92-eb28-0410-84fd-f71c24880f
tags/0.5.5
Shane Mc Cormack 16年前
コミット
529784f7c6
1個のファイルの変更26行の追加2行の削除
  1. 26
    2
      installer/release.sh

+ 26
- 2
installer/release.sh ファイルの表示

12
 showHelp() {
12
 showHelp() {
13
 	echo "This will generate the different DMDirc installers."
13
 	echo "This will generate the different DMDirc installers."
14
 	echo "Usage: ${0} [params] <release>"
14
 	echo "Usage: ${0} [params] <release>"
15
-	echo "Release can be either 'trunk', a valid tag, or a branch (if -b is passed)"
15
+	echo "Release can be either 'trunk', 'this', a valid tag, or a branch (if -b is passed)"
16
 	echo "The following params are known:"
16
 	echo "The following params are known:"
17
 	echo "---------------------"
17
 	echo "---------------------"
18
 	echo "-b, --branch                       <release> is a branch"
18
 	echo "-b, --branch                       <release> is a branch"
72
 if [ "${LAST}" != "" ]; then
72
 if [ "${LAST}" != "" ]; then
73
 	if [ "${LAST}" = "trunk" ]; then
73
 	if [ "${LAST}" = "trunk" ]; then
74
 		RELEASE=""
74
 		RELEASE=""
75
+	elif [ "${LAST}" = "this" ]; then
76
+		# Work out what type of build this is!
77
+		thisDIR=${PWD}
78
+		cd ..
79
+		tempDIR=${PWD##*/}
80
+		if [ "${tempDIR}" = "trunk" ]; then
81
+			echo "This is a trunk release.";
82
+		else
83
+			echo "This is not a trunk release.";
84
+			version=${tempDIR}
85
+			cd ..
86
+			tempDIR=${PWD##*/}
87
+			if [ "${tempDIR}" = "tags" ]; then
88
+				echo "Release of tag "${version}
89
+			elif [ "${tempDIR}" = "branches" ]; then
90
+				echo "Release of branch "${version}
91
+				BRANCH="-b "
92
+			else
93
+				echo "Unknown release target."
94
+				exit 0;
95
+			fi
96
+			RELEASE="-r "${version}
97
+		fi;
98
+		cd ${thisDIR}
75
 	elif [ "${BRANCH}" != "" -a ! -e "../../branches/"${LAST} ]; then
99
 	elif [ "${BRANCH}" != "" -a ! -e "../../branches/"${LAST} ]; then
76
 		echo "Branch '"${LAST}"' not found."
100
 		echo "Branch '"${LAST}"' not found."
77
 		exit 1;
101
 		exit 1;
83
 	fi
107
 	fi
84
 else
108
 else
85
 	echo "Usage: ${0} [params] <release>"
109
 	echo "Usage: ${0} [params] <release>"
86
-	echo "Release can be either 'trunk' or a valid tag. (see ${0} --help for further information)"
110
+	echo "Release can be either 'this', 'trunk' or a valid tag. (see ${0} --help for further information)"
87
 	exit 1;
111
 	exit 1;
88
 fi
112
 fi
89
 
113
 

読み込み中…
キャンセル
保存