build: support pkg managers installation (#87)

closes #71, #84, #86
- AUR
- Homebrew
- Nix
- Debian (.deb)
- RPM (.rpm)
- Aqua
- ASDF

This is my first time doing this, so there might be mistakes. If you
can't download it through any pkg manager, please leave a comment or
open an issue

---------

Co-authored-by: use-the-fork <23747916+use-the-fork@users.noreply.github.com>
This commit is contained in:
VERSE
2026-07-31 17:16:31 +07:00
committed by GitHub
co-authored by use-the-fork
parent e9e50c7dea
commit e09f4609f6
16 changed files with 519 additions and 140 deletions
+9
View File
@@ -0,0 +1,9 @@
# Watch flake.nix for changes.
watch_file flake.nix
# Disable builders for trivial flake actions, such as direnv reload.
# Helps us reduce overhead introduced by a redundant network request.
if ! NIX_CONFIG="builders =" use flake . ; then
echo "Default shell could not be loaded." >&2
return 1
fi
+16 -45
View File
@@ -5,9 +5,9 @@ on:
branches: branches:
- main - main
tags: tags:
- 'v*' - "v*"
pull_request: pull_request:
branches: [ '**' ] branches: ["**"]
workflow_dispatch: workflow_dispatch:
concurrency: concurrency:
@@ -24,11 +24,13 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: '1.24' go-version: "1.24"
cache: true cache: true
- name: Tidy - name: Tidy
@@ -42,52 +44,21 @@ jobs:
- name: Run Tests - name: Run Tests
run: go test -v ./... run: go test -v ./...
- name: Build Binaries - name: Create vendor tarball
if: startsWith(github.ref, 'refs/tags/v') if: startsWith(github.ref, 'refs/tags/v')
run: | run: |
mkdir -p dist go mod vendor
platforms=("linux/amd64" "linux/arm64" "darwin/amd64" "darwin/arm64") tar -czf iris-${GITHUB_REF_NAME#v}-vendor.tar.gz vendor/
for platform in "${platforms[@]}"; do sha256sum iris-${GITHUB_REF_NAME#v}-vendor.tar.gz > iris-${GITHUB_REF_NAME#v}-vendor.tar.gz.sha256
os_arch=(${platform//\// })
GOOS=${os_arch[0]}
GOARCH=${os_arch[1]}
output_name="iris"
[ "$GOOS" == "windows" ] && output_name="iris.exe"
echo "Building $GOOS/$GOARCH..." - name: Run GoReleaser
GOOS=$GOOS GOARCH=$GOARCH go build \
-ldflags="-s -w -X github.com/versenilvis/iris/root.Version=${{ github.ref_name }}" \
-trimpath -o "dist/$output_name" ./cmd/iris
cd dist
tar -czf "iris_${GOOS}_${GOARCH}.tar.gz" "$output_name"
rm "$output_name"
cd ..
done
- name: Prepare Release Notes
if: startsWith(github.ref, 'refs/tags/v') if: startsWith(github.ref, 'refs/tags/v')
run: | uses: goreleaser/goreleaser-action@v6
# Generate standard GitHub release notes
GEN_NOTES=$(gh api repos/${{ github.repository }}/releases/generate-notes -f tag_name=${{ github.ref_name }} --jq .body)
cat <<EOF > release_notes.md
$GEN_NOTES
## Update
\`\`\`bash
iris update
\`\`\`
EOF
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with: with:
name: ${{ github.ref_name }} distribution: goreleaser
body_path: release_notes.md version: latest
files: dist/*.tar.gz args: release --clean
generate_release_notes: false
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AUR_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
+3
View File
@@ -8,3 +8,6 @@ docs/code
docs/plan docs/plan
todo.txt todo.txt
scratch/ scratch/
.env
.byte/
dist/
+92
View File
@@ -0,0 +1,92 @@
version: 2
project_name: iris
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w -X github.com/versenilvis/iris/root.Version={{.Version}}
flags:
- -trimpath
main: ./cmd/iris
binary: iris
archives:
- format: tar.gz
name_template: >-
{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}
checksum:
name_template: "checksums.txt"
algorithm: sha256
release:
extra_files:
- glob: ./iris-*-vendor.tar.gz
- glob: ./iris-*-vendor.tar.gz.sha256
footer: |
## Update
```bash
iris update
```
# AUR
aurs:
- name: iris-bin
package: |-
install -Dm755 "./iris" "${pkgdir}/usr/bin/iris"
install: "scripts/aur.install"
homepage: "https://github.com/versenilvis/iris"
description: "A highly customizable, blazing fast and context-aware CLI autocomplete/navigation tool"
maintainers:
- "VERSE <sunnyone0901@gmail.com>"
license: "MIT"
private_key: "{{ .Env.AUR_KEY }}"
git_url: "ssh://aur@aur.archlinux.org/iris.git"
commit_author:
name: "goreleaserbot"
email: "bot@goreleaser.com"
commit_msg_template: "AUR release {{ .Tag }}"
provides:
- iris
conflicts:
- iris-bin
# Homebrew
brews:
- repository:
owner: versenilvis
name: homebrew-iris
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
directory: Formula
homepage: "https://github.com/versenilvis/iris"
description: "A highly customizable, blazing fast and context-aware CLI autocomplete/navigation tool"
license: "MIT"
caveats: |
To completely remove IRIS configurations and shell hooks,
please run 'iris uninstall' BEFORE removing this package, or manually
clean up ~/.config/iris and your shell RC files (e.g. ~/.zshrc).
test: |
system "#{bin}/iris", "--help"
# Debian/RPM
nfpms:
- id: iris
package_name: iris
vendor: "versenilvis"
homepage: "https://github.com/versenilvis/iris"
maintainer: "VERSE <sunnyone0901@gmail.com>"
description: "A highly customizable, blazing fast and context-aware CLI autocomplete/navigation tool"
license: "MIT"
file_name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
scripts:
prerm: "scripts/prerm.sh"
formats:
- deb
- rpm
bindir: /usr/bin
+132 -17
View File
@@ -38,6 +38,7 @@ Run iris wherever you already work; your local machine, a remote server, or anyw
--> -->
## AI suggestions ## AI suggestions
<div align="center"> <div align="center">
<img width="1920" height="1080" alt="output" src="https://github.com/user-attachments/assets/ab80fe75-b5dd-4acd-84bb-45bca17ee3b7" /> <img width="1920" height="1080" alt="output" src="https://github.com/user-attachments/assets/ab80fe75-b5dd-4acd-84bb-45bca17ee3b7" />
<i>IRIS has AI suggestions like your code editor (API key/Local)</i> <i>IRIS has AI suggestions like your code editor (API key/Local)</i>
@@ -83,20 +84,135 @@ Shell plugins are great, but they also come with trade-offs. And also, not every
- Terminal emulator with ANSI color support - Terminal emulator with ANSI color support
- Go 1.24 or newer (if building from source) - Go 1.24 or newer (if building from source)
> [!WARNING]
> Currently, Windows is not supported
#### Method 1: Install script (recommended) #### Method 1: Package managers
<details>
<summary><b>Arch Linux (AUR)</b></summary>
<br>
IRIS is available on the Arch User Repository. You can install it using your favorite AUR helper:
```bash
yay -S iris-bin
```
</details>
<details>
<summary><b>macOS / Linux (Homebrew)</b></summary>
<br>
Install IRIS via Homebrew tap:
```bash
brew install versenilvis/iris/iris
```
</details>
<details>
<summary><b>Nix Flakes</b></summary>
<br>
If you are using Nix Flakes, you can consume this module directly without building it manually.
1. In your `flake.nix` inputs, add:
```nix
iris.url = "github:versenilvis/iris/main";
```
2. Then, use one of the following options to add IRIS to your system:
**Option A: Try without installing (ephemeral)**
```bash
nix run github:versenilvis/iris
```
**Option B: Install to your user profile**
```bash
nix profile install github:versenilvis/iris
```
**Option C: Using Home Manager**
*(Ensure you pass `inputs` to modules via `extraSpecialArgs`)*
```nix
home.packages = [ inputs.iris.packages.${pkgs.system}.default ];
```
**Option D: Without Home Manager (NixOS System)**
*(Ensure you pass `inputs` to modules via `specialArgs`)*
```nix
environment.systemPackages = [ inputs.iris.packages.${pkgs.system}.default ];
```
</details>
<details>
<summary><b>Debian / Ubuntu (.deb)</b></summary>
<br>
```bash
curl -sLO https://github.com/versenilvis/iris/releases/latest/download/iris_linux_amd64.deb
sudo dpkg -i iris_linux_amd64.deb
rm iris_linux_amd64.deb
```
*(For ARM64 architecture, replace `amd64` with `arm64`)*
</details>
<details>
<summary><b>Fedora / RHEL (.rpm)</b></summary>
<br>
```bash
curl -sLO https://github.com/versenilvis/iris/releases/latest/download/iris_linux_amd64.rpm
sudo rpm -i iris_linux_amd64.rpm
rm iris_linux_amd64.rpm
```
*(For ARM64 architecture, replace `amd64` with `arm64`)*
</details>
<details>
<summary><b>Aqua</b></summary>
<br>
If you use [aqua](https://aquaproj.github.io/), you can install IRIS by adding it to your `aqua.yaml`:
```yaml
packages:
- name: versenilvis/iris
```
Then run `aqua i`.
</details>
<details>
<summary><b>asdf</b></summary>
<br>
If you use [asdf](https://asdf-vm.com/), you can install IRIS via its plugin:
```bash
asdf plugin add iris https://github.com/versenilvis/asdf-iris.git
asdf install iris latest
asdf set -u iris latest
asdf current iris
```
</details>
#### Method 2: Install script (recommended)
```bash ```bash
curl -sSL https://raw.githubusercontent.com/versenilvis/iris/main/scripts/install.sh | sh curl -sSL https://raw.githubusercontent.com/versenilvis/iris/main/scripts/install.sh | sh
``` ```
#### Method 2: Go install #### Method 3: Go install
```bash ```bash
go install github.com/versenilvis/iris/cmd/iris@latest go install github.com/versenilvis/iris/cmd/iris@latest
``` ```
#### Method 3: Build from source (for developers) #### Method 4: Build from source (for developers)
```bash ```bash
git clone https://github.com/versenilvis/iris.git git clone https://github.com/versenilvis/iris.git
@@ -104,9 +220,6 @@ cd iris
just reload just reload
``` ```
> [!WARNING]
> Currently, Windows is not supported
## Uninstall ## Uninstall
To completely uninstall IRIS, remove all configurations, and clean up your shell integration files, simply run: To completely uninstall IRIS, remove all configurations, and clean up your shell integration files, simply run:
@@ -224,18 +337,19 @@ timeout_ms = 5000
| <kbd>↓</kbd> | Navigate down / history | Move the selection down, or open command history when the prompt is empty.| | <kbd>↓</kbd> | Navigate down / history | Move the selection down, or open command history when the prompt is empty.|
| <kbd>→</kbd> | Accept ghost text | Accept the faded ghost text suggestion when the menu is open. | | <kbd>→</kbd> | Accept ghost text | Accept the faded ghost text suggestion when the menu is open. |
| <kbd>←</kbd> / <kbd>→</kbd> | Move cursor | Move the cursor inside the input buffer. Disabled when the prompt is empty| | <kbd>←</kbd> / <kbd>→</kbd> | Move cursor | Move the cursor inside the input buffer. Disabled when the prompt is empty|
| <kbd>Ctrl</kbd> + <kbd>R</kbd> | Switch mode | Toggle between `spec` and `history` mode. | | <kbd>Ctrl/⌘</kbd> + <kbd>R</kbd> | Switch mode | Toggle between `spec` and `history` mode. |
| <kbd>Ctrl</kbd> + <kbd>A</kbd> | Beginning of line | Move the cursor to the start of the command line. | | <kbd>Ctrl/⌘</kbd> + <kbd>A</kbd> | Beginning of line | Move the cursor to the start of the command line. |
| <kbd>Ctrl</kbd> + <kbd>E</kbd> | End of line | Move the cursor to the end of the command line. | | <kbd>Ctrl/⌘</kbd> + <kbd>E</kbd> | End of line | Move the cursor to the end of the command line. |
| <kbd>Ctrl</kbd> + <kbd>L</kbd> | Clear screen | Clear the terminal while preserving the input buffer and redrawing the menu. | | <kbd>Ctrl/⌘</kbd> + <kbd>L</kbd> | Clear screen | Clear the terminal while preserving the input buffer and redrawing the menu. |
| <kbd>Ctrl</kbd> + <kbd>U</kbd> | Clear command | Remove the entire current command and close the menu. | | <kbd>Ctrl/⌘</kbd> + <kbd>U</kbd> | Clear command | Remove the entire current command and close the menu. |
| <kbd>Ctrl</kbd> + <kbd>C</kbd> | Cancel command | Send `SIGINT`, clear the input buffer, and close the menu. | | <kbd>Ctrl/⌘</kbd> + <kbd>C</kbd> | Cancel command | Send `SIGINT`, clear the input buffer, and close the menu. |
| <kbd>Ctrl</kbd> + <kbd>W</kbd> | Delete word | Delete the word immediately before the cursor. | | <kbd>Ctrl/⌘</kbd> + <kbd>W</kbd> | Delete word | Delete the word immediately before the cursor. |
> [!NOTE] > [!NOTE]
> With <kbd>Ctrl</kbd> + <kbd>A</kbd>, <kbd>Ctrl</kbd> + <kbd>E</kbd>, <kbd>Ctrl</kbd> + <kbd>W</kbd>, <kbd>Ctrl</kbd> + <kbd>U</kbd>, <kbd>Ctrl</kbd> + <kbd>L</kbd>, and <kbd>Ctrl</kbd> + <kbd>C</kbd>: they belong to your shell by default. IRIS handles them directly in raw mode so your cursor and menu stay in sync > With <kbd>Ctrl/⌘</kbd> + <kbd>A</kbd>, <kbd>Ctrl/⌘</kbd> + <kbd>E</kbd>, <kbd>Ctrl/⌘</kbd> + <kbd>W</kbd>, <kbd>Ctrl/⌘</kbd> + <kbd>U</kbd>, <kbd>Ctrl/⌘</kbd> + <kbd>L</kbd>, and <kbd>Ctrl/⌘</kbd> + <kbd>C</kbd>: they belong to your shell by default. IRIS handles them directly in raw mode so your cursor and menu stay in sync
## Theme ## Theme
<div align="center"> <div align="center">
<img width="1920" height="1080" alt="Kitty terminal showcase" src="https://github.com/user-attachments/assets/d45cf36e-6d7d-437a-9af9-28cd994bf55f" /> <img width="1920" height="1080" alt="Kitty terminal showcase" src="https://github.com/user-attachments/assets/d45cf36e-6d7d-437a-9af9-28cd994bf55f" />
😺 <i>Kitty terminal</i> 😺 <i>Kitty terminal</i>
@@ -300,6 +414,7 @@ Thank you!
I'd love to hear your feedback I'd love to hear your feedback
Feel free to reach out via: Feel free to reach out via:
* [Email](mailto:versedev.store@proton.me)
* [Twitter](https://twitter.com/versenilvis) - [Email](mailto:versedev.store@proton.me)
* [GitHub issues](https://github.com/versenilvis/iris/issues/new) - [Twitter](https://twitter.com/versenilvis)
- [GitHub issues](https://github.com/versenilvis/iris/issues/new)
Generated
+51 -1
View File
@@ -1,5 +1,23 @@
{ {
"nodes": { "nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1782949081,
"narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1785090369, "lastModified": 1785090369,
@@ -16,9 +34,41 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib": {
"locked": {
"lastModified": 1782614948,
"narHash": "sha256-ePjCwr1sNm9NYUqywL7QfK3JnlS015msC+eBu2zKlp8=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "db3f255737b94216eb71cce308e2912cf6bc2d7c",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "flake-parts": "flake-parts",
"nixpkgs": "nixpkgs",
"systems": "systems"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
} }
} }
}, },
+38 -24
View File
@@ -1,26 +1,32 @@
{ {
description = "IRIS - Shell commands suggestion tool";
inputs = { inputs = {
systems.url = "github:nix-systems/default";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
}; };
outputs = { self, nixpkgs }: outputs = inputs @ {flake-parts, ...}:
let flake-parts.lib.mkFlake
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
pkgsFor = system: nixpkgs.legacyPackages.${system};
in
{ {
packages = forAllSystems (system: inherit inputs;
let }
pkgs = pkgsFor system; (
in
{ {
inputs,
self,
...
}: {
systems = import inputs.systems;
perSystem = {
pkgs,
self',
...
}: {
packages = {
iris = pkgs.buildGoModule { iris = pkgs.buildGoModule {
pname = "iris"; pname = "iris";
version = self.shortRev or "dirty"; version = self.shortRev or "dirty";
src = ./.; src = pkgs.lib.cleanSource ./.;
subPackages = ["cmd/iris"]; subPackages = ["cmd/iris"];
@@ -30,23 +36,31 @@
doCheck = false; doCheck = false;
meta = with pkgs.lib; { meta = with pkgs.lib; {
description = "A shell auto-completion tool that works like code editor's IntelliSense"; description = "A highly customizable, blazing fast and context-aware CLI autocomplete/navigation tool";
homepage = "https://github.com/versenilvis/iris"; homepage = "https://github.com/versenilvis/iris";
license = licenses.mit; license = licenses.mit;
mainProgram = "iris"; mainProgram = "iris";
}; };
}; };
default = self.packages.${system}.iris; default = self'.packages.iris;
}); };
devShells = forAllSystems (system: devShells.default = pkgs.mkShellNoCC {
let # Tell Direnv to shut up.
pkgs = pkgsFor system; DIRENV_LOG_FORMAT = "";
in
{ packages = [
default = pkgs.mkShell { # languages
buildInputs = with pkgs; [ go ]; pkgs.go
pkgs.pkl
# Tooling
pkgs.hk
pkgs.just
pkgs.alejandra
];
}; };
});
}; };
} }
);
}
+41
View File
@@ -0,0 +1,41 @@
amends "package://github.com/jdx/hk/releases/download/v1.50.0/hk@1.50.0#/Config.pkl"
import "package://github.com/jdx/hk/releases/download/v1.50.0/hk@1.50.0#/Builtins.pkl"
local linters = new {
["pkl"] = Builtins.pkl
}
local formatter = new {
["newlines"] = Builtins.newlines
["fix-smart-quotes"] = Builtins.fix_smart_quotes
["alejandra"] = (Builtins.alejandra) {
exclude = List("**/npins/default.nix")
}
["pkl-format"] = Builtins.pkl_format
["just-format"] = Builtins.just_format
}
hooks {
["pre-commit"] {
fix = true
stash = "git"
steps {
...linters
...formatter
}
}
["fix"] {
fix = true
steps {
...linters
...formatter
}
}
["check"] {
steps {
...linters
...formatter
}
}
}
+17
View File
@@ -0,0 +1,17 @@
packages:
- type: github_release
repo_owner: versenilvis
repo_name: iris
description: "A highly customizable, blazing fast and context-aware CLI autocomplete/navigation tool"
asset: "iris_{{.OS}}_{{.Arch}}.{{.Format}}"
format: tar.gz
bin:
- iris
checksum:
type: github_release
asset: checksums.txt
file_format: regexp
algorithm: sha256
pattern:
checksum: ^(\b[A-Fa-f0-9]{64}\b)
file: "^\\b[A-Fa-f0-9]{64}\\b\\s+(.*)$"
+12
View File
@@ -0,0 +1,12 @@
BSD Zero Clause License
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -euo pipefail
[ -n "$ASDF_INSTALL_VERSION" ] || { echo "ASDF_INSTALL_VERSION is required" >&2; exit 1; }
[ -n "$ASDF_DOWNLOAD_PATH" ] || { echo "ASDF_DOWNLOAD_PATH is required" >&2; exit 1; }
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m)
case "$ARCH" in
x86_64) ARCH="amd64" ;;
aarch64) ARCH="arm64" ;;
esac
URL="https://github.com/versenilvis/iris/releases/download/v${ASDF_INSTALL_VERSION}/iris_${OS}_${ARCH}.tar.gz"
echo "Downloading Iris from $URL"
curl -sSL "$URL" -o "$ASDF_DOWNLOAD_PATH/iris.tar.gz"
tar -xzf "$ASDF_DOWNLOAD_PATH/iris.tar.gz" -C "$ASDF_DOWNLOAD_PATH"
rm "$ASDF_DOWNLOAD_PATH/iris.tar.gz"
+9
View File
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail
[ -n "$ASDF_INSTALL_PATH" ] || { echo "ASDF_INSTALL_PATH is required" >&2; exit 1; }
[ -n "$ASDF_DOWNLOAD_PATH" ] || { echo "ASDF_DOWNLOAD_PATH is required" >&2; exit 1; }
mkdir -p "$ASDF_INSTALL_PATH/bin"
cp "$ASDF_DOWNLOAD_PATH/iris" "$ASDF_INSTALL_PATH/bin/iris"
chmod +x "$ASDF_INSTALL_PATH/bin/iris"
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
git ls-remote --tags --refs "https://github.com/versenilvis/iris.git" \
| grep -o 'refs/tags/v[0-9].*' \
| cut -d/ -f3- \
| sed 's/^v//' \
| sort -t. -k 1,1n -k 2,2n -k 3,3n
+9
View File
@@ -0,0 +1,9 @@
pre_remove() {
echo ""
echo "========================================================================="
echo " WARNING: To completely remove IRIS configurations and shell hooks,"
echo " please run 'iris uninstall' BEFORE removing this package, or manually"
echo " clean up ~/.config/iris and your shell RC files (e.g. ~/.zshrc)."
echo "========================================================================="
echo ""
}
+1 -1
View File
@@ -155,7 +155,7 @@ get_download_url() {
err "GitHub API error (HTTP ${http_code}): ${msg}" err "GitHub API error (HTTP ${http_code}): ${msg}"
fi fi
url=$(echo "${releases}" | grep "browser_download_url" | grep "${arch}" | head -1 | cut -d '"' -f 4) url=$(echo "${releases}" | grep "browser_download_url" | grep "${arch}\.tar\.gz" | head -1 | cut -d '"' -f 4)
echo "${url}" echo "${url}"
} }
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
action="$1"
if [ "$action" = "remove" ] || [ "$action" = "0" ]; then
echo ""
echo "========================================================================="
echo " WARNING: To completely remove IRIS configurations and shell hooks,"
echo " please run 'iris uninstall' BEFORE removing this package, or manually"
echo " clean up ~/.config/iris and your shell RC files (e.g. ~/.zshrc)."
echo "========================================================================="
echo ""
fi