Skip to content

Commit 3c5fd9f

Browse files
authored
Merge pull request #713 from nextcloud/fix/checkSameCodeBase
2 parents 70da644 + db1ca96 commit 3c5fd9f

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/check-same-code-base.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ jobs:
4747
run: |
4848
composer -V --ansi
4949
./vendor/bin/box info -lm flat updater.phar | LC_LOCALE=C sort | grep -Ev "^(Signature Hash| Version.php |Contents: | installed.php |Timestamp: )" > updater.old.txt
50+
# Makes sure repository is clean so the version isn't generated with "dirty" suffix
51+
git restore .
5052
make updater.phar
5153
./vendor/bin/box info -lm flat updater.phar | LC_LOCALE=C sort | grep -Ev "^(Signature Hash| Version.php |Contents: | installed.php |Timestamp: )" > updater.txt
5254
diff --suppress-common-lines -t --tabsize=4 -d -y --color=always updater.txt updater.old.txt

tests/checkSameCodeBase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function findDiffPos($original, $copy) {
6565
$fileContent = file_get_contents($path);
6666

6767
$fileContent = explode("namespace NC\\Updater;\n", $fileContent, 2)[1];
68-
$fileContent = preg_replace('/use [^\\\\]*;\n/', '', $fileContent);
68+
$fileContent = preg_replace('/^use [^\\\\]*;\n/m', '', $fileContent);
6969

7070
$fileContent = trim($fileContent);
7171

updater.phar

-7 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)