3 Commits

Author SHA1 Message Date
641efc3bf7 Update automation workflow with new CLI args
All checks were successful
/ Compile and upload a release build (release) Successful in 1m10s
2025-07-22 09:41:54 -05:00
144fba5373 Bump crate version to v3.0.0
Some checks failed
/ Compile and upload a release build (release) Failing after 49s
2025-07-21 16:37:37 -05:00
7f35b808e5 Lint and format 2025-07-21 16:37:14 -05:00
3 changed files with 9 additions and 5 deletions

View File

@@ -22,7 +22,9 @@ jobs:
- name: Upload the program (using itself!)
run: >
target/release/gt-tool-${{ github.ref_name }}-$(arch)
-u ${{ vars.DEST_GITEA }} -r ${{ vars.DEST_REPO }}
-u ${{ vars.DEST_GITEA }}
-o ${{ vars.DEST_OWNER }}
-r ${{ vars.DEST_REPO }}
upload-release
"${{ github.ref_name }}"
target/release/gt-tool-${{ github.ref_name }}-$(arch)

View File

@@ -1,6 +1,6 @@
[package]
name = "gt-tool"
version = "3.0.0-alpha.1"
version = "3.0.0"
edition = "2024"
[dependencies]

View File

@@ -31,16 +31,18 @@ async fn main() -> Result<(), gt_tool::Error> {
.or(config.gitea_url)
.ok_or(gt_tool::Error::MissingGiteaUrl)?;
let owner = args.owner
let owner = args
.owner
.or(config.owner)
.ok_or(gt_tool::Error::MissingRepoOwner)?;
let repo = args.repo
let repo = args
.repo
.or(config.repo)
.or_else(infer_repo)
.ok_or(gt_tool::Error::MissingRepoName)?;
let repo_fqrn = String::from(format!("{owner}/{repo}"));
let repo_fqrn = format!("{owner}/{repo}");
let mut headers = reqwest::header::HeaderMap::new();
headers.append(ACCEPT, header::HeaderValue::from_static("application/json"));