Skip to content

Commit a6fba1b

Browse files
assistant-ngalaiko[bot]ngalaiko
authored andcommitted
Restore jj revision image tags
1 parent e59321f commit a6fba1b

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

packages/release/default.nix

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ rec {
3030
pkgs.skopeo
3131
pkgs.gh
3232
pkgs.gitMinimal
33+
pkgs.jujutsu
3334
];
3435
text = ''
3536
system="''${1:?usage: push-image <x86_64-linux>}"
@@ -53,14 +54,18 @@ rec {
5354
"docker-archive:dist/computer.exe.$system.tar.gz" \
5455
"docker://$image:$tag"
5556
56-
# Publish the commit tag used by the deployment workflow. A single-arch
57-
# image needs no manifest list.
57+
# Publish the commit tags used by deployment. A single-arch image needs
58+
# no manifest list, but it still needs both the Git and jj revision tags.
59+
jj root >/dev/null 2>&1 || jj git init --colocate
5860
git_sha="$(git rev-parse --short HEAD)"
59-
skopeo --insecure-policy copy \
60-
--src-creds "$ghcr_user:$ghcr_token" \
61-
--dest-creds "$ghcr_user:$ghcr_token" \
62-
"docker://$image:$tag" \
63-
"docker://$image:$git_sha"
61+
jj_rev="$(jj log --no-graph -r '@' -T 'change_id.short()')"
62+
for revision in "$git_sha" "$jj_rev"; do
63+
skopeo --insecure-policy copy \
64+
--src-creds "$ghcr_user:$ghcr_token" \
65+
--dest-creds "$ghcr_user:$ghcr_token" \
66+
"docker://$image:$tag" \
67+
"docker://$image:$revision"
68+
done
6469
'';
6570
};
6671

0 commit comments

Comments
 (0)