Skip to content

Commit 41c8432

Browse files
committed
Merge branch 'QA_5_2'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2 parents 41c1d2b + 58570cf commit 41c8432

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

scripts/create-release.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,12 @@ if [ $do_ci -eq 0 -a -$do_daily -eq 0 ] ; then
451451
fi
452452
fi
453453

454-
# Cleanup release dir
455-
LC_ALL=C date -u > RELEASE-DATE-$version
454+
# Save the build date
455+
if [ $do_daily -eq 1 ] ; then
456+
LC_ALL=C date -u > RELEASE-DATE-$VERSION_SERIES_FROM_FILE+snapshot
457+
else
458+
LC_ALL=C date -u > RELEASE-DATE-$version
459+
fi
456460

457461
# Building documentation
458462
echo "* Running sphinx-build (version: $(sphinx-build --version))"

test/classes/GitTest.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,13 @@ public function testCheckGitRevisionPacksFolder(): void
189189
mkdir($this->testDir . '.git/objects/pack', 0777, true);//default = 0777, recursive mode
190190

191191
$commit = $this->object->checkGitRevision();
192+
// Delete the dataset
193+
rmdir($this->testDir . '.git/objects/pack');
194+
rmdir($this->testDir . '.git/objects');
195+
unlink($this->testDir . '.git/packed-refs');
196+
unlink($this->testDir . '.git/HEAD');
197+
unlink($this->testDir . '.git/config');
198+
rmdir($this->testDir . '.git');
192199

193200
if (
194201
$commit === null
@@ -212,13 +219,6 @@ public function testCheckGitRevisionPacksFolder(): void
212219
$this->assertSame('phpMyAdmin bot', $commit['committer']['name']);
213220
$this->assertSame('bot@phpmyadmin.net', $commit['committer']['email']);
214221
$this->assertSame('2023-05-14T00:19:49Z', $commit['committer']['date']);
215-
216-
rmdir($this->testDir . '.git/objects/pack');
217-
rmdir($this->testDir . '.git/objects');
218-
unlink($this->testDir . '.git/packed-refs');
219-
unlink($this->testDir . '.git/HEAD');
220-
unlink($this->testDir . '.git/config');
221-
rmdir($this->testDir . '.git');
222222
}
223223

224224
/**
@@ -296,6 +296,14 @@ public function testCheckGitRevisionPacksFile(): void
296296
);
297297

298298
$commit = $this->object->checkGitRevision();
299+
// Delete the dataset
300+
unlink($this->testDir . '.git/objects/info/packs');
301+
rmdir($this->testDir . '.git/objects/info');
302+
rmdir($this->testDir . '.git/objects');
303+
unlink($this->testDir . '.git/packed-refs');
304+
unlink($this->testDir . '.git/HEAD');
305+
unlink($this->testDir . '.git/config');
306+
rmdir($this->testDir . '.git');
299307

300308
if (
301309
$commit === null
@@ -319,14 +327,6 @@ public function testCheckGitRevisionPacksFile(): void
319327
$this->assertSame('phpMyAdmin bot', $commit['committer']['name']);
320328
$this->assertSame('bot@phpmyadmin.net', $commit['committer']['email']);
321329
$this->assertSame('2023-05-14T00:19:49Z', $commit['committer']['date']);
322-
323-
unlink($this->testDir . '.git/objects/info/packs');
324-
rmdir($this->testDir . '.git/objects/info');
325-
rmdir($this->testDir . '.git/objects');
326-
unlink($this->testDir . '.git/packed-refs');
327-
unlink($this->testDir . '.git/HEAD');
328-
unlink($this->testDir . '.git/config');
329-
rmdir($this->testDir . '.git');
330330
}
331331

332332
/**

0 commit comments

Comments
 (0)