Skip to content

Commit fd0d867

Browse files
Version reporting improvements (#2588)
* Append version files instead of overwriting * Reporting not only direct dependencies * Run composer show in the actual scenario folder
1 parent e670e76 commit fd0d867

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ define run_composer_with_retry
983983
done \
984984

985985
mkdir -p /tmp/artifacts
986-
$(COMPOSER) --working-dir=$1 show -f json -D | grep -o '"name": "[^"]*\|"version": "[^"]*' | paste -d';' - - | sed 's/"name": //; s/"version": //' | tr -d '"' >> "/tmp/artifacts/web_versions.csv"
986+
$(COMPOSER) --working-dir=$1 show -f json | grep -o '"name": "[^"]*\|"version": "[^"]*' | paste -d';' - - | sed 's/"name": //; s/"version": //' | tr -d '"' >> "/tmp/artifacts/web_versions.csv"
987987
endef
988988

989989
define run_tests_without_coverage

tests/Common/IntegrationTestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@ public static function ddSetUpBeforeClass()
3636
mkdir($artifactsDir, 0777, true);
3737
}
3838

39-
file_put_contents($artifactsDir . "/extension_versions.csv", $csv);
39+
file_put_contents($artifactsDir . "/extension_versions.csv", $csv, FILE_APPEND);
4040

4141
$csv = '';
42-
$output = shell_exec('DD_TRACE_ENABLED=0 composer show -f json -D');
42+
$output = shell_exec('DD_TRACE_ENABLED=0 composer --working-dir=./tests show -f json');
4343
$data = json_decode($output, true);
4444

4545
foreach ($data['installed'] as $package) {
4646
$csv = $csv . $package['name'] . ";" . $package['version'] . "\n";
4747
}
4848

49-
file_put_contents($artifactsDir . "/composer_versions.csv", $csv);
49+
file_put_contents($artifactsDir . "/composer_versions.csv", $csv, FILE_APPEND);
5050
}
5151

5252
public static function ddTearDownAfterClass()

0 commit comments

Comments
 (0)