From 949162579d42fd1400e3758b3c864c24b3b1ecb2 Mon Sep 17 00:00:00 2001 From: mik-tf Date: Wed, 2 Oct 2024 12:19:55 -0400 Subject: [PATCH] push output gives new flist url created --- flist.v | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/flist.v b/flist.v index 1341683..5fcc14e 100644 --- a/flist.v +++ b/flist.v @@ -172,6 +172,19 @@ fn push(tag string) { if response.status_code == 200 { println('Request successful. Response body:') println(response.body) + + // Get the hub username to construct the flist URL + hub_user := get_hub_username(tfhub_token) or { + error_message('Failed to get hub username') + exit(1) + } + + // Construct the flist URL + flist_name := tag.replace(':', '-') + '.flist' + flist_url := 'https://hub.grid.tf/$hub_user/$flist_name' + + println('\nFlist URL:') + println(flist_url) } else { eprintln('Request failed with status code: ${response.status_code}') eprintln('Response body:')