releng: fix docs upload

There were two bugs I found:
1. If the build isn't already done in the store, nix-store --realise
   does not know how to build it. You have to just give it the
   derivation and I guess it will realise all outputs, which is fine.
2. cp without -T will not overwrite an existing manual directory,
   creating a path manual/manual.

Change-Id: Ibebfd136a266da5330944a985e636ebb776f1909
This commit is contained in:
jade 2024-06-11 20:42:50 -07:00
parent 38e4e69633
commit d0b28f0e74

View file

@ -275,11 +275,11 @@ def do_tag_merge(force_tag=False, no_check_git=False):
def build_manual(eval_result):
manual = next(x['outputs']['doc'] for x in eval_result if x['attr'] == 'build.x86_64-linux')
(drv, manual) = next((x['drvPath'], x['outputs']['doc']) for x in eval_result if x['attr'] == 'build.x86_64-linux')
print('[+] Building manual')
realise([manual])
realise([drv])
cp --no-preserve=mode -vr @(manual)/share/doc/nix @(MANUAL)
cp --no-preserve=mode -T -vr @(manual)/share/doc/nix/manual @(MANUAL)
def upload_manual(env: RelengEnvironment):