• R/O
  • HTTP
  • SSH
  • HTTPS

kz_h8write: Commit

H8/3069F writer for KOZOS - kz_h8write


Commit MetaInfo

Revision220cebeb7d20a94dc1ce601d1a4637d8bef91206 (tree)
Zeit2012-12-18 15:53:27
AutorShinichiro Nakamura <shinta.main.jp@gmai...>
CommiterShinichiro Nakamura

Log Message

Added utility.

Ändern Zusammenfassung

Diff

--- /dev/null
+++ b/create-release.sh
@@ -0,0 +1,56 @@
1+#!/bin/sh
2+
3+#
4+# Variables
5+#
6+MODULE_NAME=kz_h8write
7+VERSION_NUMBER=$1
8+TAG_NAME="v$VERSION_NUMBER"
9+FILE_NAME="$MODULE_NAME-$TAG_NAME.tar.gz"
10+RELEASE_FILES="doc/ example/ src/"
11+
12+GIT_STATUS=`git status`
13+GIT_TAG=`git tag`
14+STATUS_CHECK=`echo $GIT_STATUS | grep 'working directory clean' | wc -l`
15+TAG_CHECK=`echo $GIT_TAG | grep "$1" | wc -l`
16+
17+#
18+# Status check
19+#
20+if [ "$VERSION_NUMBER" = "" ]
21+then
22+ echo "create-release.sh [version number]"
23+ exit
24+fi
25+
26+if [ "$STATUS_CHECK" = "0" ]
27+then
28+ echo "Please check this working directory."
29+ echo "This working directory changes something."
30+ exit
31+fi
32+
33+if [ ! "$TAG_CHECK" = "0" ]
34+then
35+ echo "The specified version already exists."
36+ exit
37+fi
38+
39+#
40+# Create the release
41+#
42+echo '=========================================='
43+echo "MODULE :$MODULE_NAME"
44+echo "VERSION:$VERSION_NUMBER"
45+echo "FILE :$FILE_NAME"
46+echo '=========================================='
47+
48+git tag $TAG_NAME
49+tar cvfz $FILE_NAME $RELEASE_FILES
50+
51+#
52+# Messages
53+#
54+echo "Please execute following command to fix the tag for the new release."
55+echo " git push --tags "
56+
Show on old repository browser