Skip to content

Commit 4952837

Browse files
committed
2 parents e8da01c + c85ec1f commit 4952837

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

class.release.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct() {
2828
$this->platform_null = ' > nul 2>&1';
2929
$this->platform = 'win';
3030
} else {
31-
$this->platform_null = ' > /dev/null 2> 1';
31+
$this->platform_null = ' > /dev/null 2>&1';
3232
$this->platform = 'nix';
3333
}
3434
}
@@ -136,7 +136,7 @@ public function get_config() {
136136

137137
// Retrieve the current WP version from the wordpress.org API.
138138
$this->set_current_wp_version();
139-
139+
140140
// Now that we have our config variables we can define the placeholders.
141141
$this->placeholders = array( 'tag' => $this->tag, 'plugin-slug' => $this->plugin_slug, 'wp-version' => $this->latest_wp_version );
142142

@@ -172,7 +172,7 @@ public function validate_git_repo() {
172172
echo 'Pulling the current repo...';
173173
exec( '"' . $this->config_settings['git-path'] . 'git" pull ' . $this->platform_null, $output, $result );
174174
echo ' done.' . PHP_EOL;
175-
175+
176176
// Let's make sure the tag exists.
177177
echo 'Checking if the tag exists in git...';
178178
exec( '"' . $this->config_settings['git-path'] . 'git" rev-parse "' . $this->tag . '"' . $this->platform_null, $output, $result );
@@ -260,11 +260,11 @@ public function generate_readme() {
260260
if( $this->config_settings['changelog'] && file_exists( $this->path . '/' . $this->config_settings['changelog'] ) ) {
261261
$changelog = file_get_contents( $this->path . '/' . $this->config_settings['changelog'] );
262262
$split_cl = explode( PHP_EOL, $changelog );
263-
263+
264264
// Since the changelog is in "standard" MarkDown format, convert it to "WordPress" MarkDown format.
265265
// Note: Can't use a simple regex as the EOL marker may be '\r\n' or '\n' depending on the platform and
266266
// preg_match() only match '\n' for newlines, leaving an extra '\r' that messes up the formating.
267-
$changelog = '';
267+
$changelog = '';
268268
foreach( $split_cl as $line ) {
269269
if( '##' == substr( $line, 0, 2 ) ) {
270270
$line = '= ' . trim( substr( $line, 2 ) ) . ' =';
@@ -392,28 +392,28 @@ public function delete_files_from_svn() {
392392

393393
echo $post_msg . PHP_EOL;
394394
}
395-
395+
396396
public function update_files_to_svn() {
397397
echo 'Modified files to commit to SVN...';
398-
398+
399399
$prefix = ' ';
400400
$post_msg = ' no files to commit to SVN.';
401401
$display_count = count( $this->svn_modified );
402402
$remainder = $display_count;
403-
403+
404404
if( $display_count > 5 ) { $display_count = 5; }
405-
405+
406406
$remainder = $remainder - $display_count;
407-
407+
408408
if( $display_count > 0 && $remainder > 0 ) { $post_msg = " and {$remainder} more."; }
409-
409+
410410
if( $display_count > 0 && $remainder < 1 ) { $post_msg = "."; }
411-
411+
412412
for( $i = 0; $i < $display_count; $i++ ) {
413413
echo $prefix . $this->svn_modified[$i];
414414
$prefix = ', ';
415415
}
416-
416+
417417
echo $post_msg . PHP_EOL;
418418
}
419419

@@ -441,7 +441,7 @@ public function commit_svn_changes() {
441441
}
442442

443443
echo ' done!' . PHP_EOL;
444-
444+
445445
if( ! $this->config_settings['svn-do-not-tag'] ) {
446446
echo 'Tagging SVN...';
447447

@@ -473,7 +473,7 @@ private function clean_up() {
473473
// Clean up the temporary dirs/files.
474474
$this->delete_tree( $this->temp_dir );
475475
}
476-
476+
477477
if( false !== $this->temp_file ) {
478478
unlink( $this->temp_file );
479479
}
@@ -536,17 +536,17 @@ private function release_replace_placeholders( $string, $placeholders ) {
536536
if( ! is_array( $placeholders ) ) {
537537
return $string;
538538
}
539-
539+
540540
foreach( $placeholders as $tag => $value ) {
541541
$string = preg_replace( '/{{' . $tag . '}}/i', $value, $string );
542542
}
543543

544544
return $string;
545545
}
546-
546+
547547
private function error_and_exit( $message ) {
548548
echo $message . PHP_EOL;
549-
549+
550550
$this->clean_up();
551551

552552
exit;
@@ -567,5 +567,5 @@ private function set_current_wp_version() {
567567
}
568568
}
569569
}
570-
570+
571571
}

0 commit comments

Comments
 (0)