launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #32637
[Merge] ~ruinedyourlife/launchpad:fix-wrong-conflict-removal into launchpad:master
Quentin Debhi has proposed merging ~ruinedyourlife/launchpad:fix-wrong-conflict-removal into launchpad:master.
Commit message:
Add wrongfully removed credentials creation for cargo publishing
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~ruinedyourlife/launchpad/+git/launchpad/+merge/487668
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~ruinedyourlife/launchpad:fix-wrong-conflict-removal into launchpad:master.
diff --git a/lib/lp/crafts/model/craftrecipebuildjob.py b/lib/lp/crafts/model/craftrecipebuildjob.py
index f1cbcf5..c799b7f 100644
--- a/lib/lp/crafts/model/craftrecipebuildjob.py
+++ b/lib/lp/crafts/model/craftrecipebuildjob.py
@@ -381,6 +381,12 @@ class CraftPublishingJob(CraftRecipeBuildJobDerived):
f.write(config_content)
+ # Create credentials.toml
+ with open(os.path.join(cargo_dir, "credentials.toml"), "w") as f:
+ f.write(
+ "\n" "[registries.launchpad]\n" f'token = "Bearer {token}"\n'
+ )
+
# Replace any Cargo.toml files with their .orig versions if they exist,
# as the .orig files contain the original content before build
# modifications
Follow ups