Skip to content

Commit 512fe60

Browse files
committed
convert undo script to php
1 parent db3c052 commit 512fe60

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

configure.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,5 @@ function replace_in_file(string $file, array $replacements): void {
126126
}
127127

128128
confirm('Execute `composer install` and run tests?') && run('composer install && composer test');
129+
129130
confirm('Let this script delete itself?', true) && unlink(__FILE__);

undo-configure.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
function run(string $command): string {
5+
return trim(shell_exec($command));
6+
}
7+
8+
run('git reset head --hard');
9+
run('git clean -f -d');
10+
run('rm -fr vendor');
11+
run('rm composer.lock');

undo_configure.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)