Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added aws-cli from aqua #3370

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ You can also specify the full name for a tool using `mise use aqua:1password/cli
| atmos | [aqua:cloudposse/atmos](https://github.com/cloudposse/atmos) [asdf:cloudposse/asdf-atmos](https://github.com/cloudposse/asdf-atmos) |
| auto-doc | [asdf:looztra/asdf-auto-doc](https://github.com/looztra/asdf-auto-doc) |
| aws-amplify | [ubi:aws-amplify/amplify-cli](https://github.com/aws-amplify/amplify-cli) [asdf:LozanoMatheus/asdf-aws-amplify-cli](https://github.com/LozanoMatheus/asdf-aws-amplify-cli) |
| aws-cli | [aqua:aws/aws-cli](https://github.com/aws/aws-cli) [asdf:MetricMike/asdf-awscli](https://github.com/MetricMike/asdf-awscli) |
| aws-copilot | [aqua:aws/copilot-cli](https://github.com/aws/copilot-cli) [asdf:NeoHsu/asdf-copilot](https://github.com/NeoHsu/asdf-copilot) |
| aws-iam-authenticator | [aqua:kubernetes-sigs/aws-iam-authenticator](https://github.com/kubernetes-sigs/aws-iam-authenticator) [asdf:zekker6/asdf-aws-iam-authenticator](https://github.com/zekker6/asdf-aws-iam-authenticator) |
| aws-nuke | [aqua:rebuy-de/aws-nuke](https://github.com/rebuy-de/aws-nuke) [asdf:bersalazar/asdf-aws-nuke](https://github.com/bersalazar/asdf-aws-nuke) |
| aws-sam | [pipx:aws-sam-cli](https://pypi.org/project/aws-sam-cli) [asdf:amrox/asdf-pyapp](https://github.com/amrox/asdf-pyapp) |
| aws-sso | [aqua:synfinatic/aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) [asdf:adamcrews/asdf-aws-sso-cli](https://github.com/adamcrews/asdf-aws-sso-cli) |
| aws-vault | [aqua:99designs/aws-vault](https://github.com/99designs/aws-vault) [asdf:karancode/asdf-aws-vault](https://github.com/karancode/asdf-aws-vault) |
| awscli | [asdf:MetricMike/asdf-awscli](https://github.com/MetricMike/asdf-awscli) |
| awscli-local | [asdf:paulo-ferraz-oliveira/asdf-awscli-local](https://github.com/paulo-ferraz-oliveira/asdf-awscli-local) |
| awsebcli | [pipx:awsebcli](https://pypi.org/project/awsebcli) [asdf:amrox/asdf-pyapp](https://github.com/amrox/asdf-pyapp) |
| awsls | [ubi:jckuester/awsls](https://github.com/jckuester/awsls) [asdf:chessmango/asdf-awsls](https://github.com/chessmango/asdf-awsls) |
Expand Down
5 changes: 4 additions & 1 deletion registry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ atmos.backends = ["aqua:cloudposse/atmos", "asdf:cloudposse/asdf-atmos"]
auto-doc.backends = ["asdf:looztra/asdf-auto-doc"]
aws-amplify.aliases = ["amplify"]
aws-amplify.backends = ["ubi:aws-amplify/amplify-cli[exe=amplify]", "asdf:LozanoMatheus/asdf-aws-amplify-cli"]
aws-cli.aliases = ["aws", "awscli"]
aws-cli.backends = ["aqua:aws/aws-cli", "asdf:MetricMike/asdf-awscli"]
aws-cli.test = ["aws --version", "aws-cli/{{version}}"]
aws-cli.os = ["linux", "macos"]
aws-copilot.backends = ["aqua:aws/copilot-cli", "asdf:NeoHsu/asdf-copilot"]
aws-iam-authenticator.backends = ["aqua:kubernetes-sigs/aws-iam-authenticator", "asdf:zekker6/asdf-aws-iam-authenticator"]
aws-nuke.backends = ["aqua:rebuy-de/aws-nuke", "asdf:bersalazar/asdf-aws-nuke"]
Expand All @@ -69,7 +73,6 @@ aws-sam.backends = ["pipx:aws-sam-cli", "asdf:amrox/asdf-pyapp"]
# aws-sam.test = ["sam --version", "SAM CLI, version {{version}}"] # takes forever on windows in CI
aws-sso.backends = ["aqua:synfinatic/aws-sso-cli", "asdf:adamcrews/asdf-aws-sso-cli"]
aws-vault.backends = ["aqua:99designs/aws-vault", "asdf:karancode/asdf-aws-vault"]
awscli.backends = ["asdf:MetricMike/asdf-awscli"]
awscli-local.backends = ["asdf:paulo-ferraz-oliveira/asdf-awscli-local"]
awsebcli.backends = ["pipx:awsebcli", "asdf:amrox/asdf-pyapp"]
awsebcli.test = ["eb --version", "EB CLI {{version}}"]
Expand Down
2 changes: 2 additions & 0 deletions src/backend/aqua.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ impl AquaBackend {
file::make_executable(&bin_path)?;
} else if format == "dmg" {
file::un_dmg(&tarball_path, &install_path)?;
} else if format == "pkg" {
file::un_pkg(&tarball_path, &install_path)?;
} else {
bail!("unsupported format: {}", format);
}
Expand Down
10 changes: 10 additions & 0 deletions src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,16 @@ pub fn un_dmg(archive: &Path, dest: &Path) -> Result<()> {
Ok(())
}

pub fn un_pkg(archive: &Path, dest: &Path) -> Result<()> {
debug!(
"pkgutil --expand-full {} {}",
archive.display(),
dest.display()
);
cmd!("pkgutil", "--expand-full", archive, dest).run()?;
Ok(())
}

#[cfg(windows)]
pub fn un7z(archive: &Path, dest: &Path) -> Result<()> {
sevenz_rust::decompress_file(archive, dest)
Expand Down
Loading