Skip to content

Commit

Permalink
ci: Integrate the winget package manager for Windows (#26)
Browse files Browse the repository at this point in the history
* docs: Made the README a bit more presentable

* ci(#patch): Fixed up goreleaser to remove old deprecated syntax and added the winget package manager
  • Loading branch information
riweston authored Mar 20, 2024
1 parent cd1f3fe commit 110dfa6
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 73 deletions.
63 changes: 42 additions & 21 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,54 @@
builds:
- goos:
- darwin
- linux
- windows
archives:
- format: zip
brews:
- tap:
- name: aztx
url_template: "https://github.com/riweston/aztx/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
repository:
owner: riweston
name: homebrew-aztx
# Optionally a token can be provided, if it differs from the token provided to GoReleaser
token: "{{ .Env.HOMEBREW }}"
url_template: "https://github.com/riweston/aztx/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
commit_author:
name: goreleaserbot
email: [email protected]
homepage: "https://github.com/riweston/aztx"
description: "This tool is a helper for azure-cli that leverages fzf for a nice interface to switch between subscription contexts."
license: "Apache"
license: "MIT"
dependencies:
- name: azure-cli
- name: fzf
builds:
- goos:
- darwin
- linux
- windows
scoop:
bucket:
owner: riweston
name: scoop-bucket
token: "{{ .Env.HOMEBREW }}"
url_template: "https://github.com/riweston/aztx/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
commit_author:
name: goreleaserbot
email: [email protected]
homepage: "https://github.com/riweston/aztx"
description: "This tool is a helper for azure-cli that leverages fzf for a nice interface to switch between subscription contexts."
license: "Apache"
scoops:
- name: aztx
url_template: "https://github.com/riweston/aztx/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
repository:
owner: riweston
name: scoop-bucket
token: "{{ .Env.HOMEBREW }}"
commit_author:
name: goreleaserbot
email: [email protected]
homepage: "https://github.com/riweston/aztx"
description: "This tool is a helper for azure-cli that leverages fzf for a nice interface to switch between subscription contexts."
license: "MIT"
depends:
- azure-cli
- fzf
winget:
- name: aztx
url_template: "https://github.com/riweston/aztx/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
package_identifier: "riweston.aztx"
repository:
owner: riweston
name: winget-aztx
token: "{{ .Env.HOMEBREW }}"
commit_author:
name: goreleaserbot
email: [email protected]
homepage: "https://github.com/riweston/aztx"
short_description: "This tool is a helper for azure-cli that leverages fzf for a nice interface to switch between subscription contexts."
license: "MIT"
publisher: "Richard Weston"
81 changes: 29 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,86 +1,63 @@
<h1 align="center">aztx</h1>
<p>
<img alt="Version" src="https://img.shields.io/badge/version-1.0.1-blue.svg?cacheSeconds=2592000" />
<img src="https://img.shields.io/badge/go-%3E%3D1.16.6-blue.svg" />
<a href="https://github.com/riweston/aztx#readme" target="_blank">
<img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg" />
</a>
<a href="https://github.com/riweston/aztx/graphs/commit-activity" target="_blank">
<img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" />
</a>
<a href="https://github.com/riweston/aztx/blob/master/LICENSE" target="_blank">
<img alt="License: MIT" src="https://img.shields.io/github/license/riweston/aztx" />
</a>
</p>
## README

This tool is a helper for azure-cli that leverages fzf for a nice interface to switch between subscription contexts.

Additionally it can also be used to quickly switch back to a previous subscription context using the `aztx -` command in a similar way to `cd -` in bash.
Additionally, it can also be used to quickly switch back to a previous subscription context using the `aztx -` command in a similar way to `cd -` in bash.

### 🏠 [Homepage](https://github.com/riweston/aztx#readme)

### ✨ Demo
### Demo

[![asciicast](https://asciinema.org/a/Rk36acdIGN9K6w5WO5Rx74NwA.svg)](https://asciinema.org/a/Rk36acdIGN9K6w5WO5Rx74NwA)

## Prerequisites
### Prerequisites

> [!NOTE]
> This tool is built on top of the azure-cli and fzf and requires them to be installed and configured.
> If you use the Brew or Scoop package managers, these pre-requisites should be handled during the installation.
- go >=1.16.6
- azure-cli >= 2.22.1
- fzf >= 0.20.0

## Install
### Installation Options

### Brew (Linux/Mac)
#### [Brew](https://brew.sh/) (Mac/Linux)

```sh
brew tap riweston/aztx
brew install aztx
$ brew tap riweston/aztx
$ brew install aztx
```

### Scoop (Windows)
#### [Scoop](https://scoop.sh/) (Windows)

```sh
scoop bucket add riweston https://github.com/riweston/scoop-bucket.git
scoop update
scoop install riweston/aztx
$ scoop bucket add riweston https://github.com/riweston/scoop-bucket.git
$ scoop update
$ scoop install riweston/aztx
```

### Manual
#### Download a prebuilt binary (Linux/Mac/Windows)

Grab a release from the repo and install it.
Download the latest release from the [releases page](https://github.com/riweston/aztx/releases) and add it to your PATH.

### Build from source
#### Install from source (Linux/Mac/Windows)

```sh
go install github.com/riweston/aztx
$ go install github.com/riweston/aztx
```

## Usage

```sh
aztx
# Run the tool in interactive mode
$ aztx
# Switch back to the previous subscription context
$ aztx -
Switched to "Test Subscription 1" (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
# Switch back again to the previous subscription context
$ aztx -
Switched to "Test Subscription 2" (yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy)
```

## Author

👤 **Richard Weston**

* Github: [@riweston](https://github.com/riweston)
* LinkedIn: [@riweston](https://linkedin.com/in/riweston)

## 🤝 Contributing

Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/riweston/aztx/issues).

## Show your support
### Show your support

Give a ⭐️ if this project helped you!

## 📝 License

Copyright © 2021 [Richard Weston](https://github.com/riweston).<br />
This project is [MIT](https://github.com/riweston/aztx/blob/master/LICENSE) licensed.

***
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_

0 comments on commit 110dfa6

Please sign in to comment.