root/freepbx/tags/2.5.2/buildtools/generate-release.sh

Revision 5946, 3.8 kB (checked in by p_lindheimer, 5 years ago)

bump generate-release.sh tool to use 2.5 module repo

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1 #!/bin/bash
2 # use this script like:
3 # md5-amp_conf.sh 1.10.00X
4
5 # WARNING: THIS IS HARDCODED TO THE 2.3 BRANCH
6 #
7 # TODO: SHOULD CHECK THE VERSION OF THE MODULES BEFORE PROCEEDING
8 #
9 module_url="http://svn.freepbx.org/modules/branches/2.5"
10 core_url=${module_url}/core
11 framework_url=${module_url}/framework
12 dashboard_url=${module_url}/dashboard
13 customappsreg_url=${module_url}/customappsreg
14 voicemail_url=${module_url}/voicemail
15 recordings_url=${module_url}/recordings
16 music_url=${module_url}/music
17 featurecodeadmin_url=${module_url}/featurecodeadmin
18 infoservices_url=${module_url}/infoservices
19
20 case "$1" in
21   ?*)
22
23 ver=$1
24
25 cd ..
26
27 # Make sure everything is up-to-date
28 svn update
29
30 # Now make sure javascript library reflects all the changes
31 cd buildtools
32 ./pack_javascripts.sh
33 cd ..
34 svn ci --message "Auto checkin packed libfreepbx.javascripts.js as part of build process" amp_conf/htdocs/admin/common/libfreepbx.javascripts.js
35
36 # This adds the MD5 Sum for all the relevant files that gets checked in on the next steps below
37 #
38 cd amp_conf
39 find agi-bin  astetc  bin htdocs  htdocs_panel  mohmp3  sbin sounds -type f | xargs md5sum | grep -v .svn > ../upgrades/$ver.md5
40
41   ;;
42   *)
43
44 echo "usage: generate-release.sh <version>";
45 exit
46
47   ;;
48 esac
49
50
51 # Prepare and checkin the MD5 Sum
52 #
53 cd ../upgrades
54 svn add $ver.md5
55 svn ps svn:mime-type text/plain $ver.md5
56 svn ps svn:eol-style native $ver.md5
57 svn ci -m "Creating release $ver"
58
59 # Back up to the top, do an svn info to get the URL so we can use it to create a tag
60 #
61 cd ..
62 cur=`svn info | grep URL | awk ' { print $2 }'`
63 svn cp -m "Automatic tag of $ver" $cur http://svn.freepbx.org/freepbx/tags/$ver
64
65 # Now that the tag is made, we want to add core and framework to the tag so that
66 # the tag reflects the tarball. Then we will use the tag to generate the releases
67 #
68 svn cp -m "Automatic packaging of core with $ver"             $core_url             http://svn.freepbx.org/freepbx/tags/${ver}/amp_conf/htdocs/admin/modules/
69 svn cp -m "Automatic packaging of framework with $ver"        $framework_url        http://svn.freepbx.org/freepbx/tags/${ver}/amp_conf/htdocs/admin/modules/
70 svn cp -m "Automatic packaging of dashboard with $ver"        $dashboard_url        http://svn.freepbx.org/freepbx/tags/${ver}/amp_conf/htdocs/admin/modules/
71 svn cp -m "Automatic packaging of customappsreg with $ver"    $customappsreg_url    http://svn.freepbx.org/freepbx/tags/${ver}/amp_conf/htdocs/admin/modules/
72 svn cp -m "Automatic packaging of voicemail with $ver"        $voicemail_url        http://svn.freepbx.org/freepbx/tags/${ver}/amp_conf/htdocs/admin/modules/
73 svn cp -m "Automatic packaging of recordings with $ver"       $recordings_url       http://svn.freepbx.org/freepbx/tags/${ver}/amp_conf/htdocs/admin/modules/
74 svn cp -m "Automatic packaging of music with $ver"            $music_url            http://svn.freepbx.org/freepbx/tags/${ver}/amp_conf/htdocs/admin/modules/
75 svn cp -m "Automatic packaging of featurecodeadmin with $ver" $featurecodeadmin_url http://svn.freepbx.org/freepbx/tags/${ver}/amp_conf/htdocs/admin/modules/
76 svn cp -m "Automatic packaging of infoservices with $ver"     $infoservices_url     http://svn.freepbx.org/freepbx/tags/${ver}/amp_conf/htdocs/admin/modules/
77
78 # Now clear out the release diretory where we will build the tarballs and grab it from the tag to get core and framework
79 #
80 mkdir -p /usr/src/freepbx-release
81 rm -rf /usr/src/freepbx-release/freepbx-$ver
82
83 # Use the tag to build the tarball
84 #
85 svn export http://svn.freepbx.org/freepbx/tags/$ver /usr/src/freepbx-release/freepbx-$ver
86
87 cd /usr/src/freepbx-release
88 tar zcvf freepbx-$ver.tar.gz freepbx-$ver
89 cd freepbx-$ver/amp_conf/htdocs/admin/modules/
90 . ./import.sh
91
92 # import should not bring in core and framework, those were removed from its list
93 #
94 find . -name .svn -exec rm -rf {} \;
95 cd /usr/src/freepbx-release
96 tar zcvf freepbx-$ver-withmodules.tar.gz freepbx-$ver
Note: See TracBrowser for help on using the browser.