From 05402ef3047d73071b745c6f2a36e3eb4b4a582b Mon Sep 17 00:00:00 2001 From: El RIDO Date: Tue, 28 May 2024 20:58:12 +0200 Subject: [PATCH] remove version from doc blocs - @version in file header level isn't used on code docs, it is intended for API versions at class or method level - avoids needing to update all these files on version increment - avoids needing to regenerate SRI hashes for privatebin.js through extra phpunit run - simplifies VERSION_FILES list - avoids having to filter above list during loop - adds a few missing doc bloc headers --- Makefile | 7 +++---- bin/administration | 2 -- bin/configuration-test-generator | 8 ++++++++ bin/icon-test | 14 ++++++++++---- bin/migrate | 11 ++++++++++- css/bootstrap/privatebin.css | 1 - css/bootstrap5/privatebin.css | 1 - css/common.css | 1 - css/noscript.css | 1 - css/privatebin.css | 1 - index.php | 1 - js/privatebin.js | 1 - lib/Configuration.php | 1 - lib/Controller.php | 1 - lib/Data/AbstractData.php | 1 - lib/Data/Database.php | 1 - lib/Data/Filesystem.php | 1 - lib/Data/GoogleCloudStorage.php | 9 +++++++++ lib/Data/S3Storage.php | 10 +++++----- lib/Filter.php | 1 - lib/FormatV2.php | 1 - lib/I18n.php | 1 - lib/Json.php | 1 - lib/Model.php | 1 - lib/Model/AbstractModel.php | 1 - lib/Model/Comment.php | 1 - lib/Model/Paste.php | 1 - lib/Persistence/AbstractPersistence.php | 1 - lib/Persistence/PurgeLimiter.php | 1 - lib/Persistence/ServerSalt.php | 1 - lib/Persistence/TrafficLimiter.php | 1 - lib/Request.php | 1 - lib/View.php | 1 - lib/Vizhash16x16.php | 3 +-- lib/YourlsProxy.php | 1 - tpl/bootstrap.php | 2 +- tpl/bootstrap5.php | 2 +- tpl/page.php | 2 +- 38 files changed, 49 insertions(+), 48 deletions(-) diff --git a/Makefile b/Makefile index 58a16c45..a94eeb06 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ CURRENT_VERSION = 1.7.3 VERSION ?= 1.7.4 -VERSION_FILES = index.php bin/ cfg/ *.md doc/Installation.md css/ i18n/ img/ js/package.json js/privatebin.js lib/ Makefile tpl/ tst/ +VERSION_FILES = README.md SECURITY.md doc/Installation.md js/package*.json lib/Controller.php Makefile REGEX_CURRENT_VERSION := $(shell echo $(CURRENT_VERSION) | sed "s/\./\\\./g") REGEX_VERSION := $(shell echo $(VERSION) | sed "s/\./\\\./g") @@ -29,12 +29,11 @@ doc-php: ## Generate JS code documentation. phpdoc --visibility=public,protected,private --target=doc/phpdoc --directory=lib/ increment: ## Increment and commit new version number, set target version using `make increment VERSION=1.2.3`. - for F in `grep -l -R $(REGEX_CURRENT_VERSION) $(VERSION_FILES) | grep -v -e tst/log/ -e ":0" -e CHANGELOG.md`; \ + for F in `grep -l -R $(REGEX_CURRENT_VERSION) $(VERSION_FILES)`; \ do \ sed -i "s/$(REGEX_CURRENT_VERSION)/$(REGEX_VERSION)/g" $$F; \ done - cd tst && phpunit --no-coverage && cd .. - git add $(VERSION_FILES) tpl/ + git add $(VERSION_FILES) git commit -m "incrementing version" sign: ## Sign a release. diff --git a/bin/administration b/bin/administration index d2372248..0a9a52e7 100755 --- a/bin/administration +++ b/bin/administration @@ -1,6 +1,5 @@ #!/usr/bin/env php new Identicon(new GdGenerator()), diff --git a/bin/migrate b/bin/migrate index 76539ab6..a7e42f0d 100755 --- a/bin/migrate +++ b/bin/migrate @@ -1,7 +1,16 @@ #!/usr/bin/env php - + diff --git a/tpl/bootstrap5.php b/tpl/bootstrap5.php index 951a518b..4cf1dcad 100644 --- a/tpl/bootstrap5.php +++ b/tpl/bootstrap5.php @@ -57,7 +57,7 @@ endif; ?> - + diff --git a/tpl/page.php b/tpl/page.php index f5b4f6fb..aa4bf57b 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -51,7 +51,7 @@ endif; ?> - +