File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ before starting to add changes. Use example [placed in the end of the page](#exa
1111
1212## [ Unreleased]
1313
14+ - Updating the display of os2forms package on the status page
15+
1416## [ 4.0.0] 2025-03-06
1517
1618- This is an alias for for 3.22.2. Major change is the module removal, which can lead to lack of backward support.
Original file line number Diff line number Diff line change 55 * Install file for OS2Forms module.
66 */
77
8+ use Composer\InstalledVersions;
89use Drupal\field\Entity\FieldConfig;
910use Drupal\field\Entity\FieldStorageConfig;
1011use Drupal\taxonomy\Entity\Term;
@@ -63,21 +64,17 @@ function os2forms_requirements($phase) {
6364 'value' => $messages,
6465 ];
6566
66- $commit_sha = exec('git rev-parse HEAD');
67- $tag = exec("git describe --tags --abbrev=0");
68- $remote = exec('git config --get remote.origin.url');
67+ $reference = InstalledVersions::getReference("os2forms/os2forms");
68+ $version = InstalledVersions::getPrettyVersion("os2forms/os2forms");
6969
7070 $version_messages = [
7171 '#prefix' => t('OS2Forms version'),
7272 '#theme' => 'item_list',
7373 '#items' => [
74- 0 => t('tag <strong>@tag</strong> (commit: <strong>@commit</strong>)', [
75- '@tag' => $tag,
76- '@commit' => $commit_sha,
77- ]),
78- 1 => t('remote: <strong>@remote</strong>', [
79- '@remote' => $remote,
80- ]),
74+ 0 => t('version <strong>@version</strong> (commit: <strong>@reference</strong>)', [
75+ '@version' => $version,
76+ '@reference' => $reference,
77+ ])
8178 ],
8279 ];
8380
You can’t perform that action at this time.
0 commit comments