ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/fbintf/release.sh
Revision: 56
Committed: Mon Mar 6 10:20:02 2017 UTC (7 years, 8 months ago) by tony
Content type: text/x-sh
File size: 2716 byte(s)
Log Message:
Committing updates for Trunk

File Contents

# User Rev Content
1 tony 56 #!/bin/sh
2     #Export FBINTF
3    
4     SVNROOT=svn://olympus/svn/mwa/lazarus-packages
5    
6     if [ -n "`ps ax|grep libreoffice|grep -v grep`" ]; then
7     echo "libreoffice is running. Please terminate all instances of libreoffice before running this script"
8     exit 1
9     fi
10    
11     if grep 'tba,' changelog >/dev/null; then
12     sed -i "0,/([0-9]\+\.[0-9]\+-[0-9]\+).*\$/{s/\(([0-9]\+\.[0-9]\+-[0-9]\+)\).*\$/ \1 `date '+%a, %d %b %Y %H:%M:%S %z'`/}" changelog
13     fi
14    
15     VERSION=`grep 'version *([0-9]\+\.[0-9]\+-[0-9]\+)' changelog | head -n 1| sed 's/.*version *(\([0-9]\+\.[0-9]\+-[0-9]\+\)).*/\1/'`
16     V1=`echo "$VERSION"|sed 's/\([0-9]\+\)\.\([0-9]\+\)-\([0-9]\+\)/\1/'`
17     V2=`echo "$VERSION"|sed 's/\([0-9]\+\)\.\([0-9]\+\)-\([0-9]\+\)/\2/'`
18     V3=`echo "$VERSION"|sed 's/\([0-9]\+\)\.\([0-9]\+\)-\([0-9]\+\)/\3/'`
19     TAG=$V1-$V2-$V3
20    
21     sed -i "s/FBIntf_Major.*/FBIntf_Major = $V1;/
22     s/FBIntf_Minor.*/FBIntf_Minor = $V2;/
23     s/FBIntf_Release.*/FBIntf_Release = $V3;/
24     s/FBIntf_Version.*/FBIntf_Version = '$V1.$V2.$V3';/" IB.pas
25     sed -i "/<License/,/<Files/{s/<Version.*\/>/<Version Major=\"$V1\" Minor=\"$V2\" Release = \"$V3\" \/>/}" fbintf.lpk
26     sed -i "s/<VersionInfo Name=\"MajorVer\">[0-9]\+<\/VersionInfo>/<VersionInfo Name=\"MajorVer\">$V1<\/VersionInfo>/
27     s/<VersionInfo Name=\"MinorVer\">[0-9]\+<\/VersionInfo>/<VersionInfo Name=\"MinorVer\">$V2<\/VersionInfo>/
28     s/<VersionInfo Name=\"Release\">[0-9]\+<\/VersionInfo>/<VersionInfo Name=\"Release\">$V3<\/VersionInfo>/
29     s/<VersionInfoKeys Name=\"FileVersion\">[0-9\.]\+<\/VersionInfoKeys>/<VersionInfoKeys Name=\"FileVersion\">$V1.$V2.$V3.0<\/VersionInfoKeys>/
30     s/<VersionInfoKeys Name=\"ProductVersion\">[0-9\.]\+<\/VersionInfoKeys>/<VersionInfoKeys Name=\"ProductVersion\">$V1.$V2.$V3.0<\/VersionInfoKeys>/" fbintf.dproj
31    
32     svn commit -m ""
33     svn rm $SVNROOT/fbintf/tags/R$TAG -m "" >/dev/null
34     svn copy $SVNROOT/fbintf/trunk $SVNROOT/fbintf/tags/R$TAG -m "Release $TAG"
35     cd /tmp
36     rm -rf fbintf
37     svn export $SVNROOT/fbintf/tags/R$TAG fbintf
38     cd fbintf
39    
40     find . -name '*.orig' -exec rm -f '{}' \;
41     #Generate Documentation
42     find . -name '*.odt' -execdir libreoffice --invisible --convert-to pdf '{}' \;
43     find . -name '*.odt' -exec rm '{}' \;
44     find . -name '*.lps' -exec rm '{}' \;
45     rm release.sh
46     cd ..
47     tar -zcf fbintf$VERSION.tar.gz fbintf
48     cd fbintf
49     #convert to dos format
50     find . -name '*.bat' -exec todos '{}' \;
51     find . -name '*.log' -exec todos '{}' \;
52     find . -name '*.fpc' -exec todos '{}' \;
53     find . -name '*.txt' -exec todos '{}' \;
54     find . -name '*.lpk' -exec todos '{}' \;
55     find . -name '*.pas' -exec todos '{}' \;
56     find . -name '*.lpm' -exec todos '{}' \;
57     find . -name '*.inc' -exec todos '{}' \;
58     find . -name '*.lpr' -exec todos '{}' \;
59     find . -name '*.lpi' -exec todos '{}' \;
60     cd ..
61     echo `pwd`
62     zip -r fbintf$VERSION.zip fbintf
63    

Properties

Name Value
svn:executable *