Subversion Repositories oidplus

Rev

Rev 1430 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1430 Rev 1444
Line 145... Line 145...
145
// Step 2: Write change-scripts (for ZIP/TAR-GZ distribution channel)
145
// Step 2: Write change-scripts (for ZIP/TAR-GZ distribution channel)
146
// The order of $git_version_cache is very critical here!
146
// The order of $git_version_cache is very critical here!
147
 
147
 
148
$prev_commit = '-';
148
$prev_commit = '-';
149
$prev_version = '2.0.0.0';
149
$prev_version = '2.0.0.0';
-
 
150
$latest_version = null;
150
foreach ($git_version_cache["version-first-commit"] as $version => $version_first_commit) {
151
foreach ($git_version_cache["version-first-commit"] as $version => $version_first_commit) {
-
 
152
	$latest_version = $version;
151
	$changescript_file = $output_dir.'/changescript_'.$version.'.txt';
153
	$changescript_file = $output_dir.'/changescript_'.$version.'.txt';
152
	if ($force || !file_exists($changescript_file) || !file_exists($changescript_file.'.gz')) {
154
	if ($force || !file_exists($changescript_file) || !file_exists($changescript_file.'.gz')) {
153
		echo "Generate changescript for version $version ($version_first_commit)\n";
155
		echo "Generate changescript for version $version ($version_first_commit)\n";
154
 
156
 
155
		if ($prev_commit == '-') {
157
		if ($prev_commit == '-') {
Line 180... Line 182...
180
		}
182
		}
181
	}
183
	}
182
	$prev_commit = $version_first_commit;
184
	$prev_commit = $version_first_commit;
183
	$prev_version = $version;
185
	$prev_version = $version;
184
}
186
}
-
 
187
 
-
 
188
// Step 3 (optional): Upload to GitHub (a different repository, just for deploying updates)
-
 
189
// How to setup a GitHub deployment key? See https://dylancastillo.co/how-to-use-github-deploy-keys/
-
 
190
 
-
 
191
shell_exec("cd ".escapeshellarg($output_dir)." && git add * 2>/dev/null");
-
 
192
shell_exec("cd ".escapeshellarg($output_dir)." && git commit -m ".escapeshellarg("Update $latest_version")." 2>/dev/null");
-
 
193
shell_exec("cd ".escapeshellarg($output_dir)." && git push 2>/dev/null");