Mercurial > code > home > repos > streamed-graph
diff tasks.py @ 133:8a30f1c9a702
trying to build a runnable dist
author | drewp@bigasterisk.com |
---|---|
date | Sat, 06 May 2023 14:10:55 -0700 |
parents | 73a70d00fb74 |
children | a6490559ce73 |
line wrap: on
line diff
--- a/tasks.py Sat May 06 14:10:22 2023 -0700 +++ b/tasks.py Sat May 06 14:10:55 2023 -0700 @@ -43,19 +43,23 @@ v = ctx.run('pnpm version minor').stdout.strip() ctx.run(f'hg commit --message "release {v}"') build(ctx) + install_to_bigasterisk_lib(ctx, 'streamed-graph.js', + f'lib/streamed-graph/{v}/') + # this fails with ENEEDAUTH: + #ctx.run(f'pnpm publish --registry https://bigasterisk.com/js', pty=True) + + +def install_to_bigasterisk_lib(ctx, distFile, libPath): filesRoot = '/my/site/homepage/newsrc/files' - path = f'lib/streamed-graph/{v}/' - outdir = f'{filesRoot}/{path}' - name = 'streamed-graph.es.js' + outdir = f'{filesRoot}/{libPath}' ctx.run(f'mkdir -p {outdir}') - ctx.run(f'cp dist/{name} {outdir}') + ctx.run(f'cp dist/{distFile} {outdir}') + print('rebuild bigasterisk:') ctx.run('cd /my/site/homepage; inv build') ctx.run( "curl -s -o/dev/null -w '%{url_effective} %{http_code} bytes=%{size_download}\n' " - + "https://bigasterisk.com/" + path + name, + + "https://bigasterisk.com/" + libPath + distFile, pty=True) - # this fails with ENEEDAUTH: - #ctx.run(f'pnpm publish --registry https://bigasterisk.com/js', pty=True) @task