fix(release): every snap packed without --output, into its project, then moved
snapcraft builds in LXD with the project mounted at /root/project and refuses any --output naming a folder of this machine: the root's own build/release/ for Learn's snap (found releasing Learn 0.23.0) as the clone itself for Todo's and Train's (Todo 0.1.0, both 3 Nov 2026). Every snap now packs into its project and is moved into the release's folder from there, checked with snapcraft 9.2.1 at the root. A failure after none of several apps was done now says "none" rather than nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
996e584338
commit
8565db3d89
3 changed files with 25 additions and 44 deletions
|
|
@ -101,8 +101,8 @@ Future<void> main(List<String> arguments) async {
|
|||
stderr.writeln('✗ $failure');
|
||||
if (targets.length > 1) {
|
||||
stderr.writeln(
|
||||
' Done before it: ${done.map((t) => t.app).join(', ')}; not '
|
||||
'started: ${targets.skip(done.length + 1).map((t) => t.app).join(', ')}.',
|
||||
' Done before it: ${done.isEmpty ? 'none' : done.map((t) => t.app).join(', ')}; '
|
||||
'not started: ${targets.skip(done.length + 1).map((t) => t.app).join(', ')}.',
|
||||
);
|
||||
}
|
||||
exit(1);
|
||||
|
|
|
|||
|
|
@ -215,13 +215,4 @@ final class const SnapRelease({
|
|||
/// does for the root's, and outside the repository, which the checks would
|
||||
/// otherwise analyse.
|
||||
String projectPath(String home) => '$home/.cache/halkyon-release/snap/$name';
|
||||
|
||||
/// The folder `snapcraft pack --output` names: the release's folder ([out]
|
||||
/// in [root]) for the root's; none for any other, which snapcraft then packs
|
||||
/// into its clone, where the release tool takes it from. snapcraft builds in
|
||||
/// LXD with the project mounted elsewhere, and takes an `--output` naming the
|
||||
/// clone itself for a file in the folder above it, outside the project, so
|
||||
/// refuses it (found releasing Todo 0.1.0, 3 Nov 2026).
|
||||
String? packOutput({required String root, required String out}) =>
|
||||
atRoot ? '$root/$out' : null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -454,16 +454,15 @@ final class Releaser({
|
|||
'clean',
|
||||
snap.part,
|
||||
], workingDirectory: project);
|
||||
final output = snap.packOutput(root: root.path, out: out);
|
||||
await _run('snapcraft', [
|
||||
'pack',
|
||||
if (output != null) ...['--output', output],
|
||||
], workingDirectory: project);
|
||||
if (output == null) {
|
||||
File(p.join(project, snapFile))
|
||||
..copySync(p.join(root.path, out, snapFile))
|
||||
..deleteSync();
|
||||
}
|
||||
// Packed without --output, into the project, and moved from there:
|
||||
// snapcraft builds in LXD with the project mounted elsewhere and
|
||||
// refuses any --output naming a folder of this machine, the root's
|
||||
// own build/ (found releasing Learn 0.23.0) as a clone's (Todo 0.1.0,
|
||||
// both 3 Nov 2026).
|
||||
await _run('snapcraft', ['pack'], workingDirectory: project);
|
||||
File(p.join(project, snapFile))
|
||||
..copySync(p.join(root.path, out, snapFile))
|
||||
..deleteSync();
|
||||
await _checkSnap(p.join(out, snapFile), version);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue