aboutsummaryrefslogtreecommitdiff
path: root/releng/create_release.xsh
diff options
context:
space:
mode:
authorJade Lovelace <lix@jade.fyi>2024-06-06 14:40:59 -0700
committerJade Lovelace <lix@jade.fyi>2024-06-06 20:53:08 -0700
commit98e847514795f53f485b6dbd029ecb545ce38236 (patch)
tree55404594100708d07967abcd5a9941a17e969999 /releng/create_release.xsh
parentbdf1b264add2a6e9aafab186e5c9b4bddb097b64 (diff)
releng: support pushing the manual to docs also
Change-Id: Ifd0b51425ee4955e0230fb2804a6f54ef0fe16e9
Diffstat (limited to 'releng/create_release.xsh')
-rw-r--r--releng/create_release.xsh27
1 files changed, 27 insertions, 0 deletions
diff --git a/releng/create_release.xsh b/releng/create_release.xsh
index c9725c44c..c57a92b2f 100644
--- a/releng/create_release.xsh
+++ b/releng/create_release.xsh
@@ -16,6 +16,7 @@ $XONSH_SHOW_TRACEBACK = True
RELENG_ENV = environment.STAGING
RELEASES_BUCKET = RELENG_ENV.releases_bucket
+DOCS_BUCKET = RELENG_ENV.docs_bucket
CACHE_STORE = RELENG_ENV.cache_store_uri()
REPO = RELENG_ENV.git_repo
@@ -23,6 +24,7 @@ GCROOTS_DIR = Path('./release/gcroots')
BUILT_GCROOTS_DIR = Path('./release/gcroots-build')
DRVS_TXT = Path('./release/drvs.txt')
ARTIFACTS = Path('./release/artifacts')
+MANUAL = Path('./release/manual')
RELENG_MSG = "Release created with releng/create_release.xsh"
@@ -265,6 +267,8 @@ def upload_artifacts(noconfirm=False, force_push_tag=False):
print('[+] Upload to release bucket')
aws s3 cp --recursive @(ARTIFACTS)/ @(RELEASES_BUCKET)/
+ print('[+] Upload manual')
+ upload_manual()
print('[+] git push tag')
git push @(['-f'] if force_push_tag else []) @(REPO) f'{VERSION}:refs/tags/{VERSION}'
@@ -278,7 +282,29 @@ def do_tag_merge(force_tag=False, no_check_git=False):
git switch --detach @(VERSION)
+def build_manual(eval_result):
+ manual = next(x['outputs']['doc'] for x in eval_result if x['attr'] == 'build.x86_64-linux')
+ print('[+] Building manual')
+ realise([manual])
+
+ cp --no-preserve=mode -vr @(manual)/share/doc/nix @(MANUAL)
+
+
+def upload_manual():
+ stable = json.loads($(nix eval --json '.#nix.officialRelease'))
+ if stable:
+ version = MAJOR
+ else:
+ version = 'nightly'
+
+ print('[+] aws s3 sync manual')
+ aws s3 sync @(MANUAL)/ @(DOCS_BUCKET)/manual/lix/@(version)/
+ if stable:
+ aws s3 sync @(MANUAL)/ @(DOCS_BUCKET)/manual/lix/stable/
+
+
def build_artifacts(no_check_git=False):
+ rm -rf release/
if not no_check_git:
verify_are_on_tag()
git_preconditions()
@@ -289,6 +315,7 @@ def build_artifacts(no_check_git=False):
print('[+] Building')
realise(drv_paths)
+ build_manual(eval_result)
with open(DRVS_TXT, 'w') as fh:
fh.write('\n'.join(drv_paths))