File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ before starting to add changes. Use example [placed in the end of the page](#exa
1414- [ PR-166] ( https://github.com/OS2Forms/os2forms/pull/166 )
1515 - Fix digital post commands
1616 - Updated versions in GitHub Actions ` uses ` steps
17+ - Updating the display of os2forms package on the status page
1718
1819## [ 4.0.0] 2025-03-06
1920
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