first commit.

This commit is contained in:
kj
2026-10-05 15:08:39 -03:00
commit b7799f9fff
93 changed files with 8966 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
Harness::suite('group6-release');
Harness::it('release bumpea, commitea, tagea y publica', function () {
$repo = tmpdir('relrepo');
$origin = tmpdir('relorigin') . '/origin.git';
$script = dirname(__DIR__) . '/scripts/release';
git_init($repo);
exec('git init -q --bare ' . escapeshellarg($origin));
exec('git -C ' . escapeshellarg($repo) . ' remote add origin ' . escapeshellarg($origin));
write_file($repo . '/scripts/release', file_get_contents($script));
chmod($repo . '/scripts/release', 0755);
seed_package($repo, '1.2.3');
git_commit($repo, 'init');
exec('cd ' . escapeshellarg($repo) . ' && bash scripts/release http minor', $out, $code);
eq(0, $code, 'release debe terminar bien: ' . implode("\n", $out));
$pushed = exec('git -C ' . escapeshellarg($repo) . ' tag -l "http-v1.3.0"');
eq('http-v1.3.0', $pushed, 'tag creado');
$remote = exec('git -C ' . escapeshellarg($origin) . ' tag -l "http-v1.3.0"');
eq('http-v1.3.0', $remote, 'tag publicado en origin');
$manifest = json_decode((string) file_get_contents($repo . '/packages/http/duckbrain.json'), true);
eq('1.3.0', $manifest['version']);
rrmdir($repo);
rrmdir(dirname($origin));
});