From 0f329949289620b923bfa82960aaef8231153282 Mon Sep 17 00:00:00 2001 From: Hemwunt Date: Wed, 25 Sep 2024 22:30:43 +0400 Subject: [PATCH 1/2] Refactor: Add new subcommand aliases --- src/cli.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 5ab732b..fae932e 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -2,12 +2,12 @@ use clap::Command; pub fn cli() -> Command { Command::new("courant") - .version("0.1.2") + .version("0.1.3") .author("Jain Ramchurn") .subcommand( Command::new("today") .about("Show today's power outages") - .aliases(["zordi"]), + .aliases(["zordi", "zrdi"]), ) .subcommand( Command::new("tomorrow") @@ -17,6 +17,6 @@ pub fn cli() -> Command { .subcommand( Command::new("all") .about("Show both today's and tomorrow's power outages") - .aliases(["tou", "tout"]), + .aliases(["tou", "tout", "tous"]), ) } From 46bd976b9e8e766e9076384758c4b2ee2f933efc Mon Sep 17 00:00:00 2001 From: Hemwunt Date: Wed, 25 Sep 2024 22:31:19 +0400 Subject: [PATCH 2/2] Release: add windows release --- .github/workflows/release.yml | 7 ++++++- Cargo.toml | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b38aace..46303e3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,7 +63,7 @@ jobs: # we specify bash to get pipefail; it guards against the `curl` command # failing. otherwise `sh` won't catch that `curl` returned non-0 shell: bash - run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.21.1/cargo-dist-installer.sh | sh" + run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.22.1/cargo-dist-installer.sh | sh" - name: Cache cargo-dist uses: actions/upload-artifact@v4 with: @@ -301,6 +301,11 @@ jobs: name=$(echo "$filename" | sed "s/\.rb$//") version=$(echo "$release" | jq .app_version --raw-output) + export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH" + brew update + # We avoid reformatting user-provided data such as the app description and homepage. + brew style --except-cops FormulaAudit/Homepage,FormulaAudit/Desc,FormulaAuditStrict --fix "Formula/${filename}" || true + git add "Formula/${filename}" git commit -m "${name} ${version}" done diff --git a/Cargo.toml b/Cargo.toml index 75cec3d..f592773 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kouran" -version = "0.1.2" +version = "0.1.3" edition = "2021" authors = ["Jain Ramchurn"] description = "View Power Outages in Mauritius" @@ -30,15 +30,15 @@ lto = "thin" # Config for 'cargo dist' [workspace.metadata.dist] # The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax) -cargo-dist-version = "0.21.1" +cargo-dist-version = "0.22.1" # CI backends to support ci = "github" # The installers to generate for each app -installers = ["shell", "homebrew"] +installers = ["shell", "powershell", "homebrew"] # A GitHub repo to push Homebrew formulas to tap = "k3ii/homebrew-tap" # Target platforms to build apps for (Rust target-triple syntax) -targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu"] +targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"] # Path that installers should place binaries in install-path = "CARGO_HOME" # Publish jobs to run in CI