Skip to content
Snippets Groups Projects
Commit 852f8466 authored by Jared Hancock's avatar Jared Hancock
Browse files

Package version number by `git describe`

And include the new location of the install SQL script
parent 82124462
No related branches found
No related tags found
No related merge requests found
......@@ -111,7 +111,7 @@ package("include/{,.}*", "upload/include", -1, array('*ost-config.php', '*.sw[a-
package("setup/*.{php,txt}", "upload/setup", -1, array("*scripts","*test","*stage"));
foreach (array('css','images','js') as $dir)
package("setup/$dir/*", "upload/setup/$dir", -1);
package("setup/inc/sql/*.{sql,md5}", "upload/setup/inc/sql", -1);
package("setup/inc/streams/*.sql", "upload/setup/inc/streams", -1);
# Load the license and documentation
package("*.{txt,md}", "");
......@@ -123,16 +123,17 @@ if(($mds = glob("$stage_path/*.md"))) {
}
# Make an archive of the stage folder
$version_info = preg_grep('/THIS_VERSION/',
explode("\n", file_get_contents("$root/main.inc.php")));
foreach ($version_info as $line)
eval($line);
$version = exec('git describe');
$pwd = getcwd();
chdir($stage_path);
shell_exec("tar cjf '$pwd/osTicket-".THIS_VERSION.".tar.bz2' *");
shell_exec("zip -r '$pwd/osTicket-".THIS_VERSION.".zip' *");
// Replace THIS_VERSION in the stage/ folder
shell_exec("grep -rl \"define('THIS_VERSION'\" * | xargs sed -ri -e \"s/( *).*THIS_VERSION.*/\\1define('THIS_VERSION', '$version');/\"");
shell_exec("tar cjf '$pwd/osTicket-$version.tar.bz2' *");
shell_exec("zip -r '$pwd/osTicket-$version.zip' *");
chdir($pwd);
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment