Skip to content

Commit 314cffd

Browse files
committed
Add support for custom commit/tag messages.
1 parent 41177b5 commit 314cffd

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

release.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ svn-url=https://plugins.svn.wordpress.org/{{plugin-slug}}
99
svn-username=
1010
svn-do-not-tag=
1111
svn-path=
12+
svn-tag-message=Tagged v{{tag}}.
13+
svn-commit-message=Updates for v{{tag}} release.
1214

1315
[GIT]
1416
git-use-tag={{tag}}
1517
git-path=
1618
git-do-not-tag=true
19+
git-tag-message=Tagged v{{tag}}.
1720

1821
[Delete]
1922
DeleteFiles=

release.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@
136136
$config_settings[$setting] = release_replace_placeholders( $value, $placeholders );
137137
}
138138

139+
print_r( $config_settings );
140+
exit;
141+
139142
if( ! empty( $config_settings['temp-dir'] ) && is_dir( $config_settings['temp-dir'] ) ) {
140143
$sys_temp_dir = $config_settings['temp-dir'];
141144
} else {
@@ -176,7 +179,7 @@
176179
} else {
177180
echo "Tagging " . $tag . " in the GIT repo...";
178181

179-
exec( '"' . $config_settings['git-path'] . 'git" tag "' . $tag . '" -m "Tagged v' . $tag . '."' . $platform_null, $output, $result );
182+
exec( '"' . $config_settings['git-path'] . 'git" tag "' . $tag . '" -m "' . $config_settings['git-tag-message'] . '' . $platform_null, $output, $result );
180183

181184
if( $result ) {
182185
echo " error creating tag!" . $line_ending;
@@ -391,7 +394,7 @@
391394
}
392395

393396
echo "Committing to SVN..." . $line_ending;
394-
exec( '"' . $config_settings['svn-path'] . 'svn" commit -m "Updates for ' . $tag . ' release."', $output, $result );
397+
exec( '"' . $config_settings['svn-path'] . 'svn" commit -m "' . $config_settings['svn-commit-message'] . '"', $output, $result );
395398

396399
if( $result ) {
397400
echo "Error, commit failed." . $line_ending;
@@ -405,7 +408,7 @@
405408
if( ! $config_settings['svn-do-not-tag'] ) {
406409
echo "Tagging SVN..." . $line_ending;
407410

408-
exec( '"' . $config_settings['svn-path'] . 'svn" copy "' . $config_settings['svn-url'] . '/trunk" "' . $config_settings['svn-url'] . '/tags/' . $tag . '" -m "Tagged v' . $tag . '."', $output, $result );
411+
exec( '"' . $config_settings['svn-path'] . 'svn" copy "' . $config_settings['svn-url'] . '/trunk" "' . $config_settings['svn-url'] . '/tags/' . $tag . '" -m "' . $config_settings['svn-tag-message'] . '"', $output, $result );
409412

410413
if( $result ) {
411414
echo "Error, tag failed." . $line_ending;

0 commit comments

Comments
 (0)