Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ index.php: lib/UpdateException.php lib/LogException.php lib/Updater.php index.we
awk '/^<\?php$$/,/\*\//' index.web.php > index.php
# Then concat all files while filtering php tag and license
cat lib/UpdateException.php lib/LogException.php lib/Updater.php index.web.php| grep -Pv "^namespace|^use [^\\\\]+;" | awk '/^<\?php$$/,/\*\//{next} 1' >> index.php
composer run -q cs:fix index.php

test/vendor:
composer bin tests install
Expand Down
2 changes: 0 additions & 2 deletions buildVersionFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


$currentTag = trim(shell_exec('git describe --tags') ?? '');
exec('git diff-files --quiet', $output, $returnValue);

$dirty = $returnValue === 0 ? '' : ' dirty';


$content = '<?php

namespace NC\Updater;
Expand Down
8 changes: 0 additions & 8 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


class UpdateException extends \Exception {

/** @param list<string> $data */
Expand All @@ -22,12 +21,9 @@ public function getData(): array {
}
}


class LogException extends \Exception {
}



class Updater {
/** @var int */
public const LAST_STEP = 12;
Expand Down Expand Up @@ -734,7 +730,6 @@ private function getDownloadURLs(): array {
}

return array_unique($downloadURLs);

}

private function getCurl(string $url): CurlHandle {
Expand Down Expand Up @@ -1180,7 +1175,6 @@ private function moveWithExclusions(string $dataLocation, array $excludedElement
foreach ($this->getRecursiveDirectoryIterator($dataLocation, $excludedElements) as $path => $fileInfo) {
if ($dataLocation === '') {
throw new \Exception('Invalid dataLocation procided');

}

$fileName = explode($dataLocation, $path, 2)[1] ?? null;
Expand Down Expand Up @@ -1452,7 +1446,6 @@ public function log(string $message): void {
fclose($fh);
}


/**
* Logs a message with current datetime prepended to updater.log but drops possible LogException
*/
Expand All @@ -1464,7 +1457,6 @@ public function silentLog(string $message): void {
}
}


/**
* Logs current version
*/
Expand Down
4 changes: 0 additions & 4 deletions lib/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,6 @@ private function getDownloadURLs(): array {
}

return array_unique($downloadURLs);

}

private function getCurl(string $url): CurlHandle {
Expand Down Expand Up @@ -1164,7 +1163,6 @@ private function moveWithExclusions(string $dataLocation, array $excludedElement
foreach ($this->getRecursiveDirectoryIterator($dataLocation, $excludedElements) as $path => $fileInfo) {
if ($dataLocation === '') {
throw new \Exception('Invalid dataLocation procided');

}

$fileName = explode($dataLocation, $path, 2)[1] ?? null;
Expand Down Expand Up @@ -1436,7 +1434,6 @@ public function log(string $message): void {
fclose($fh);
}


/**
* Logs a message with current datetime prepended to updater.log but drops possible LogException
*/
Expand All @@ -1448,7 +1445,6 @@ public function silentLog(string $message): void {
}
}


/**
* Logs current version
*/
Expand Down
Binary file modified updater.phar
Binary file not shown.
40 changes: 20 additions & 20 deletions vendor-bin/coding-standard/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'a8a4a7a3a2f3c5ad1b575b9b07979cbf662f894e',
'reference' => '14ebaeb097a8e7e68221b2e6e46a9d0658e3cb8b',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'__root__' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'a8a4a7a3a2f3c5ad1b575b9b07979cbf662f894e',
'reference' => '14ebaeb097a8e7e68221b2e6e46a9d0658e3cb8b',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down
Loading