mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-06-03 06:22:45 +00:00
Compare commits
1 Commits
cmd/webica
...
fix/deploy
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3fed7f1834 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -38,4 +38,3 @@ desktop.ini
|
||||
LIVE_cache
|
||||
/webid
|
||||
bin/
|
||||
.claude/
|
||||
|
||||
@@ -71,14 +71,6 @@ Builds.getPackage({ name: projName }).then(async function (/*projInfo*/) {
|
||||
var nodeOs = os.platform();
|
||||
var nodeOsRelease = os.release();
|
||||
var nodeArch = os.arch();
|
||||
|
||||
// To make arch names compatible across all helpers
|
||||
if (nodeArch === 'x64') {
|
||||
nodeArch = 'amd64';
|
||||
} else if (nodeArch === 'arm64') {
|
||||
nodeArch = 'arm64';
|
||||
}
|
||||
|
||||
var nodeLibc = 'libc';
|
||||
if (process.platform === 'linux') {
|
||||
nodeLibc = 'gnu';
|
||||
|
||||
109
btop/README.md
109
btop/README.md
@@ -1,109 +0,0 @@
|
||||
---
|
||||
title: btop
|
||||
homepage: https://github.com/aristocratos/btop
|
||||
tagline: |
|
||||
btop: a beautiful, interactive resource monitor
|
||||
description: |
|
||||
btop++ is a fast, feature-rich terminal resource monitor written in C++.
|
||||
It shows real-time usage and stats for CPU, memory, disks, network, and
|
||||
processes — with full mouse support, customizable themes, and an
|
||||
easy-to-use menu system. The spiritual successor to bashtop and bpytop.
|
||||
---
|
||||
|
||||
To update or switch versions, run `webi btop@stable` (or `@v1.4`, `@beta`, etc).
|
||||
|
||||
### Files
|
||||
|
||||
These are the files / directories that are created and/or modified with this
|
||||
install:
|
||||
|
||||
```
|
||||
~/.config/envman/PATH.env
|
||||
~/.local/bin/btop
|
||||
~/.local/opt/btop/
|
||||
~/.local/opt/btop-<VERSION>/
|
||||
```
|
||||
|
||||
## Cheat Sheet
|
||||
|
||||

|
||||
|
||||
> btop gives you a gorgeous, interactive view of what your system is doing —
|
||||
> CPU cores, RAM, swap, disk I/O, network throughput, and a filterable process
|
||||
> list — all in one terminal window.
|
||||
|
||||
### Launch btop
|
||||
|
||||
```sh
|
||||
btop
|
||||
```
|
||||
|
||||
### Navigation
|
||||
|
||||
| Key | Action |
|
||||
| -------------- | ----------------------------------- |
|
||||
| `Arrow keys` | Move selection in process list |
|
||||
| `Enter` | Show detailed stats for process |
|
||||
| `F` | Filter / search processes |
|
||||
| `K` | Send signal (kill, SIGTERM, etc.) |
|
||||
| `R` | Renice (change process priority) |
|
||||
| `T` | Toggle tree / flat process view |
|
||||
| `M` | Change sort field |
|
||||
| `ESC` | Open settings menu |
|
||||
| `Q` | Quit |
|
||||
|
||||
Mouse support is fully enabled by default — scroll and click anywhere in the UI.
|
||||
|
||||
### Change the color theme
|
||||
|
||||
Press `ESC` to open the menu, navigate to **Options → Color theme**, and pick
|
||||
from the built-in themes (Default, TTY, Dracula, Gruvbox, and more).
|
||||
|
||||
Custom themes can be placed in:
|
||||
|
||||
```
|
||||
~/.config/btop/themes/
|
||||
```
|
||||
|
||||
### Adjust update interval
|
||||
|
||||
In the Options menu, set **Update interval** (in milliseconds). The default is
|
||||
`2000` (2 seconds). Lower values give a more live feel; higher values reduce CPU
|
||||
overhead from btop itself.
|
||||
|
||||
### Config file location
|
||||
|
||||
btop's settings are saved automatically at:
|
||||
|
||||
```
|
||||
~/.config/btop/btop.conf
|
||||
```
|
||||
|
||||
You can edit this file directly to set options like `update_ms`, `color_theme`,
|
||||
`proc_sorting`, or `net_iface`.
|
||||
|
||||
### Run btop with a specific network interface shown
|
||||
|
||||
```sh
|
||||
btop --utf-foce # force UTF-8 box drawing
|
||||
btop --debug # verbose debug output to btop.log
|
||||
```
|
||||
|
||||
Network interface selection is done interactively inside btop via the network
|
||||
panel — press `B` / `N` to cycle interfaces.
|
||||
|
||||
### GPU monitoring (Linux x86\_64)
|
||||
|
||||
On Linux, btop supports Nvidia, AMD, and Intel GPUs out of the box provided the
|
||||
correct drivers are installed. If wattage or GPU stats are missing, you may need
|
||||
to grant extended capabilities:
|
||||
|
||||
```sh
|
||||
# Run once after install (requires sudo)
|
||||
sudo setcap cap_perfmon,cap_sys_ptrace+ep ~/.local/bin/btop
|
||||
```
|
||||
|
||||
### See also
|
||||
|
||||
- [btop releases](https://github.com/aristocratos/btop/releases)
|
||||
- [Theme gallery](https://github.com/aristocratos/btop/tree/main/themes)
|
||||
@@ -1,58 +0,0 @@
|
||||
#!/bin/sh
|
||||
__init_btop() {
|
||||
set -e
|
||||
set -u
|
||||
|
||||
################
|
||||
# Install btop #
|
||||
################
|
||||
|
||||
# Every package should define these 6 variables
|
||||
pkg_cmd_name="btop"
|
||||
|
||||
pkg_dst_cmd="$HOME/.local/bin/btop"
|
||||
pkg_dst="$pkg_dst_cmd"
|
||||
|
||||
pkg_src_cmd="$HOME/.local/opt/btop-v$WEBI_VERSION/bin/btop"
|
||||
pkg_src_dir="$HOME/.local/opt/btop-v$WEBI_VERSION"
|
||||
pkg_src="$pkg_src_cmd"
|
||||
|
||||
# pkg_install must be defined by every package
|
||||
pkg_install() {
|
||||
# ~/.local/opt/btop-v1.4.6/bin
|
||||
mkdir -p "$(dirname "${pkg_src_cmd}")"
|
||||
|
||||
# mv ./btop/bin/btop ~/.local/opt/btop-v1.4.6/bin/btop
|
||||
mv ./btop/bin/btop "${pkg_src_cmd}"
|
||||
}
|
||||
|
||||
# pkg_get_current_version is recommended, but not required
|
||||
pkg_get_current_version() {
|
||||
# 'btop --version' has output in this format:
|
||||
# btop 1.4.6 (rev abcdef0123)
|
||||
# This trims it down to just the version number:
|
||||
# 1.4.6
|
||||
btop --version 2> /dev/null |
|
||||
head -n 1 |
|
||||
cut -d ' ' -f 2
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fn_btop_brew_install() {
|
||||
if ! command -v brew > /dev/null; then
|
||||
"$HOME/.local/bin/webi" brew
|
||||
export PATH="$HOME/.local/opt/brew/bin:$HOME/.local/opt/brew/sbin:$PATH"
|
||||
fi
|
||||
|
||||
export HOMEBREW_NO_AUTO_UPDATE=1
|
||||
export HOMEBREW_NO_ENV_HINTS=1
|
||||
brew install btop
|
||||
}
|
||||
|
||||
my_os=$(uname -s)
|
||||
if test "Darwin" = "${my_os}" && test "$WEBI_CHANNEL" = "error"; then
|
||||
fn_btop_brew_install
|
||||
return 0
|
||||
fi
|
||||
__init_btop
|
||||
@@ -1,2 +0,0 @@
|
||||
github_releases = aristocratos/btop
|
||||
exclude = -m68k -bigsur -monterey -ventura -macos
|
||||
149
fish/install.sh
149
fish/install.sh
@@ -3,19 +3,23 @@ set -e
|
||||
set -u
|
||||
|
||||
if command -v fish > /dev/null; then
|
||||
if ! test -e ~/.config/fish/config.fish; then
|
||||
mkdir -p ~/.config/fish
|
||||
touch ~/.config/fish/config.fish
|
||||
chmod 0600 ~/.config/fish/config.fish
|
||||
fi
|
||||
if [ ! -e ~/.config/fish/config.fish ]; then
|
||||
mkdir -p ~/.config/fish
|
||||
touch ~/.config/fish/config.fish
|
||||
chmod 0600 ~/.config/fish/config.fish
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "Darwin" != "$(uname -s)" ]; then
|
||||
echo "No fish installer for Linux yet. Try this instead:"
|
||||
echo " sudo apt install -y fish"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
################
|
||||
# Install fish #
|
||||
################
|
||||
|
||||
my_os=$(uname -s)
|
||||
|
||||
# Every package should define these 6 variables
|
||||
# shellcheck disable=2034
|
||||
pkg_cmd_name="fish"
|
||||
@@ -30,109 +34,70 @@ pkg_src_dir="$HOME/.local/opt/fish-v$WEBI_VERSION"
|
||||
# shellcheck disable=2034
|
||||
pkg_src="$pkg_src_cmd"
|
||||
|
||||
if test "Darwin" = "${my_os}"; then
|
||||
pkg_src_cmd="/Applications/fish.app/Contents/Resources/base/usr/local/bin/fish"
|
||||
# shellcheck disable=2034
|
||||
pkg_src="${pkg_src_cmd}"
|
||||
fi
|
||||
|
||||
_linux_post_install() {
|
||||
if ! test -e "$HOME/.local/bin/fish"; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "To set fish as your default shell, run:"
|
||||
echo " chsh -s $HOME/.local/bin/fish"
|
||||
echo ""
|
||||
}
|
||||
# pkg_install must be defined by every package
|
||||
|
||||
_macos_post_install() {
|
||||
if ! test -e "$HOME/.local/bin/fish"; then
|
||||
return 0
|
||||
fi
|
||||
if ! [ -e "$HOME/.local/bin/fish" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Trying to set fish as the default shell..."
|
||||
echo ""
|
||||
# stop the caching of preferences
|
||||
killall cfprefsd
|
||||
echo ""
|
||||
echo "Trying to set fish as the default shell..."
|
||||
echo ""
|
||||
# stop the caching of preferences
|
||||
killall cfprefsd
|
||||
|
||||
# Set default Terminal.app shell to fish
|
||||
defaults write com.apple.Terminal "Shell" -string "$HOME/.local/bin/fish"
|
||||
echo "To set 'fish' as the default Terminal.app shell:"
|
||||
echo " Terminal > Preferences > General > Shells open with:"
|
||||
echo " $HOME/.local/bin/fish"
|
||||
echo ""
|
||||
# Set default Terminal.app shell to fish
|
||||
defaults write com.apple.Terminal "Shell" -string "$HOME/.local/bin/fish"
|
||||
echo "To set 'fish' as the default Terminal.app shell:"
|
||||
echo " Terminal > Preferences > General > Shells open with:"
|
||||
echo " $HOME/.local/bin/fish"
|
||||
echo ""
|
||||
|
||||
# Set default iTerm2 shell to fish
|
||||
if test -e "$HOME/Library/Preferences/com.googlecode.iterm2.plist"; then
|
||||
/usr/libexec/PlistBuddy \
|
||||
-c "SET ':New Bookmarks:0:Custom Command' 'Custom Shell'" \
|
||||
"$HOME/Library/Preferences/com.googlecode.iterm2.plist"
|
||||
/usr/libexec/PlistBuddy \
|
||||
-c "SET ':New Bookmarks:0:Command' $HOME/.local/bin/fish" \
|
||||
"$HOME/Library/Preferences/com.googlecode.iterm2.plist"
|
||||
echo "To set 'fish' as the default iTerm2 shell:"
|
||||
echo " iTerm2 > Preferences > Profiles > General > Command >"
|
||||
echo " Custom Shell: $HOME/.local/bin/fish"
|
||||
echo ""
|
||||
fi
|
||||
# Set default iTerm2 shell to fish
|
||||
if [ -e "$HOME/Library/Preferences/com.googlecode.iterm2.plist" ]; then
|
||||
/usr/libexec/PlistBuddy \
|
||||
-c "SET ':New Bookmarks:0:Custom Command' 'Custom Shell'" \
|
||||
"$HOME/Library/Preferences/com.googlecode.iterm2.plist"
|
||||
/usr/libexec/PlistBuddy \
|
||||
-c "SET ':New Bookmarks:0:Command' $HOME/.local/bin/fish" \
|
||||
"$HOME/Library/Preferences/com.googlecode.iterm2.plist"
|
||||
echo "To set 'fish' as the default iTerm2 shell:"
|
||||
echo " iTerm2 > Preferences > Profiles > General > Command >"
|
||||
echo " Custom Shell: $HOME/.local/bin/fish"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
killall cfprefsd
|
||||
killall cfprefsd
|
||||
}
|
||||
|
||||
# always try to reset the default shells
|
||||
if test "Darwin" = "${my_os}"; then
|
||||
_macos_post_install
|
||||
fi
|
||||
_macos_post_install
|
||||
|
||||
pkg_install() {
|
||||
if test "Darwin" = "${my_os}"; then
|
||||
rm -rf "/Applications/fish-v${WEBI_VERSION}.app"
|
||||
mv -f fish*.app "/Applications/fish-v${WEBI_VERSION}.app"
|
||||
rm -rf /Applications/fish.app
|
||||
mv "/Applications/fish-v${WEBI_VERSION}.app" "/Applications/fish.app"
|
||||
return 0
|
||||
fi
|
||||
mv fish.app/Contents/Resources/base/usr/local "$HOME/.local/opt/fish-v${WEBI_VERSION}"
|
||||
|
||||
mkdir -p "$pkg_src_dir/bin"
|
||||
mv fish "$pkg_src_dir/bin/"
|
||||
}
|
||||
|
||||
pkg_link() {
|
||||
if test "Darwin" = "${my_os}"; then
|
||||
mkdir -p "$HOME/.local/bin"
|
||||
ln -sf /Applications/fish.app/Contents/Resources/base/usr/local/bin/fish "$HOME/.local/bin/fish"
|
||||
return 0
|
||||
fi
|
||||
|
||||
rm -rf "$pkg_dst_cmd"
|
||||
ln -s "$pkg_src_cmd" "$pkg_dst_cmd"
|
||||
}
|
||||
|
||||
pkg_post_install() {
|
||||
# don't skip what webi would do automatically
|
||||
webi_post_install
|
||||
# don't skip what webi would do automatically
|
||||
webi_post_install
|
||||
|
||||
# try again to update default shells, now that all files should exist
|
||||
if test "Darwin" = "${my_os}"; then
|
||||
_macos_post_install
|
||||
else
|
||||
_linux_post_install
|
||||
fi
|
||||
if ! test -e ~/.config/fish/config.fish; then
|
||||
mkdir -p ~/.config/fish
|
||||
touch ~/.config/fish/config.fish
|
||||
chmod 0600 ~/.config/fish/config.fish
|
||||
fi
|
||||
# try again to update default shells, now that all files should exist
|
||||
_macos_post_install
|
||||
|
||||
if [ ! -e ~/.config/fish/config.fish ]; then
|
||||
mkdir -p ~/.config/fish
|
||||
touch ~/.config/fish/config.fish
|
||||
chmod 0600 ~/.config/fish/config.fish
|
||||
fi
|
||||
}
|
||||
|
||||
# pkg_get_current_version is recommended, but (soon) not required
|
||||
pkg_get_current_version() {
|
||||
# 'fish --version' has output in this format:
|
||||
# fish, version 4.3.3
|
||||
# This trims it down to just the version number:
|
||||
# 4.3.3
|
||||
fish --version 2> /dev/null | head -n 1 | cut -d ' ' -f 3
|
||||
# 'fish --version' has output in this format:
|
||||
# fish, version 3.1.2
|
||||
# This trims it down to just the version number:
|
||||
# 3.1.2
|
||||
fish --version 2> /dev/null | head -n 1 | cut -d ' ' -f 3
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ __init_gh() {
|
||||
# ~/.local/opt/gh-v0.99.9/bin
|
||||
mkdir -p "$(dirname "$pkg_src_cmd")"
|
||||
|
||||
# mv ./gh_*/bin/gh ~/.local/opt/gh-v0.99.9/bin/gh
|
||||
# mv ./gh-*/gh ~/.local/opt/gh-v0.99.9/bin/gh
|
||||
mv ./"$pkg_cmd_name"*/bin/gh "$pkg_src_cmd"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
github_releases = go-gitea/gitea
|
||||
exclude = -src- -docs-
|
||||
variants = gogit
|
||||
|
||||
@@ -23,7 +23,7 @@ __init_goreleaser() {
|
||||
# ~/.local/opt/goreleaser-v1.21.2/bin
|
||||
mkdir -p "$(dirname "$pkg_src_cmd")"
|
||||
|
||||
# mv ./goreleaser ~/.local/opt/goreleaser-v1.21.2/bin/goreleaser
|
||||
# mv ./goreleaser-*/goreleaser ~/.local/opt/goreleaser-v1.21.2/bin/goreleaser
|
||||
mv ./goreleaser "$pkg_src_cmd"
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ package classify
|
||||
import (
|
||||
"path"
|
||||
"regexp"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/webinstall/webi-installers/internal/buildmeta"
|
||||
@@ -269,11 +268,16 @@ func IsMetaAsset(name string) bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return slices.Contains([]string{
|
||||
for _, exact := range []string{
|
||||
"install.sh",
|
||||
"install.ps1",
|
||||
"compat.json",
|
||||
"b3sums",
|
||||
"dist-manifest.json",
|
||||
}, lower)
|
||||
} {
|
||||
if lower == exact {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import (
|
||||
"github.com/webinstall/webi-installers/internal/releases/chromedist"
|
||||
"github.com/webinstall/webi-installers/internal/releases/cmake"
|
||||
"github.com/webinstall/webi-installers/internal/releases/fish"
|
||||
"github.com/webinstall/webi-installers/internal/releases/gitea"
|
||||
"github.com/webinstall/webi-installers/internal/releases/flutterdist"
|
||||
"github.com/webinstall/webi-installers/internal/releases/git"
|
||||
"github.com/webinstall/webi-installers/internal/releases/golang"
|
||||
@@ -40,7 +41,7 @@ import (
|
||||
"github.com/webinstall/webi-installers/internal/releases/postgres"
|
||||
"github.com/webinstall/webi-installers/internal/releases/sass"
|
||||
"github.com/webinstall/webi-installers/internal/releases/servicemandist"
|
||||
sttrdist "github.com/webinstall/webi-installers/internal/releases/sttr"
|
||||
"github.com/webinstall/webi-installers/internal/releases/sttr"
|
||||
"github.com/webinstall/webi-installers/internal/releases/uuidv7"
|
||||
"github.com/webinstall/webi-installers/internal/releases/watchexec"
|
||||
"github.com/webinstall/webi-installers/internal/releases/xcaddy"
|
||||
@@ -97,7 +98,7 @@ func Package(pkg string, conf *installerconf.Conf, d *rawcache.Dir, gitTagDir *r
|
||||
assets = append(assets, gitAssets...)
|
||||
}
|
||||
|
||||
TagVariants(pkg, conf.Variants, assets)
|
||||
TagVariants(pkg, assets)
|
||||
assets = expandUniversal(assets)
|
||||
NormalizeVersions(pkg, assets)
|
||||
processGitTagHEAD(assets)
|
||||
@@ -193,19 +194,9 @@ func NormalizeVersions(pkg string, assets []storage.Asset) {
|
||||
}
|
||||
}
|
||||
|
||||
// TagVariants applies variant tags to classified assets.
|
||||
// conf variants (from releases.conf) are applied first: each variant is
|
||||
// matched as a case-folded substring of the filename. Package-specific
|
||||
// logic runs after for cases that require more than a substring check.
|
||||
func TagVariants(pkg string, confVariants []string, assets []storage.Asset) {
|
||||
for i := range assets {
|
||||
lower := strings.ToLower(assets[i].Filename)
|
||||
for _, v := range confVariants {
|
||||
if strings.Contains(lower, strings.ToLower(v)) {
|
||||
assets[i].Variants = append(assets[i].Variants, v)
|
||||
}
|
||||
}
|
||||
}
|
||||
// TagVariants applies package-specific variant tags to classified assets.
|
||||
// Each case delegates to a per-installer package under internal/releases/.
|
||||
func TagVariants(pkg string, assets []storage.Asset) {
|
||||
switch pkg {
|
||||
case "atomicparsley":
|
||||
atomicparsleydist.TagVariants(assets)
|
||||
@@ -219,6 +210,8 @@ func TagVariants(pkg string, confVariants []string, assets []storage.Asset) {
|
||||
flutterdist.TagVariants(assets)
|
||||
case "git":
|
||||
gitdist.TagVariants(assets)
|
||||
case "gitea":
|
||||
gitea.TagVariants(assets)
|
||||
case "lsd":
|
||||
lsddist.TagVariants(assets)
|
||||
case "node":
|
||||
|
||||
@@ -21,6 +21,9 @@ import (
|
||||
func TagVariants(assets []storage.Asset) {
|
||||
for i := range assets {
|
||||
lower := strings.ToLower(assets[i].Filename)
|
||||
if strings.Contains(lower, "-profile") {
|
||||
assets[i].Variants = append(assets[i].Variants, "profile")
|
||||
}
|
||||
if assets[i].Arch == "x86_64" {
|
||||
if strings.Contains(lower, "-baseline") {
|
||||
// Baseline is plain x86_64 — strip the suffix from
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
// Package lsd provides variant tagging for lsd (LSDeluxe) releases.
|
||||
//
|
||||
// lsd publishes .deb packages alongside the standard archives.
|
||||
// msvc builds are excluded via releases.conf variants.
|
||||
// lsd publishes .deb packages and windows-msvc builds alongside
|
||||
// the standard archives.
|
||||
package lsddist
|
||||
|
||||
import "github.com/webinstall/webi-installers/internal/storage"
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/webinstall/webi-installers/internal/storage"
|
||||
)
|
||||
|
||||
// TagVariants tags lsd-specific build variants.
|
||||
func TagVariants(assets []storage.Asset) {
|
||||
@@ -12,5 +16,8 @@ func TagVariants(assets []storage.Asset) {
|
||||
if assets[i].Format == ".deb" {
|
||||
assets[i].Variants = append(assets[i].Variants, "deb")
|
||||
}
|
||||
if strings.Contains(strings.ToLower(assets[i].Filename), "-msvc") {
|
||||
assets[i].Variants = append(assets[i].Variants, "msvc")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
// Package ollama provides variant tagging for Ollama releases.
|
||||
//
|
||||
// Ollama publishes GPU accelerator builds: -rocm (AMD), -jetpack5
|
||||
// and -jetpack6 (NVIDIA Jetson).
|
||||
package ollamadist
|
||||
|
||||
import (
|
||||
@@ -8,10 +11,14 @@ import (
|
||||
)
|
||||
|
||||
// TagVariants tags ollama-specific build variants.
|
||||
// Suffix variants (mlx, rocm, jetpack5, jetpack6) are handled by the
|
||||
// conf-driven loop in classifypkg.TagVariants; this handles the rest.
|
||||
func TagVariants(assets []storage.Asset) {
|
||||
for i := range assets {
|
||||
lower := strings.ToLower(assets[i].Filename)
|
||||
for _, v := range []string{"rocm", "jetpack5", "jetpack6"} {
|
||||
if strings.Contains(lower, "-"+v) {
|
||||
assets[i].Variants = append(assets[i].Variants, v)
|
||||
}
|
||||
}
|
||||
// Ollama-darwin.zip (capital O) is the macOS .app bundle.
|
||||
// Installable by Go (extract .app), but not in legacy cache.
|
||||
if strings.HasPrefix(assets[i].Filename, "Ollama-") {
|
||||
|
||||
@@ -23,8 +23,15 @@ var winVersionRe = regexp.MustCompile(`(?i)-win(?:7|8|81|10|2008|2012|2016)`)
|
||||
func TagVariants(assets []storage.Asset) {
|
||||
for i := range assets {
|
||||
lower := strings.ToLower(assets[i].Filename)
|
||||
if winVersionRe.MatchString(lower) {
|
||||
switch {
|
||||
case strings.Contains(lower, "-fxdependentwindesktop"):
|
||||
assets[i].Variants = append(assets[i].Variants, "fxdependentWinDesktop")
|
||||
case strings.Contains(lower, "-fxdependent"):
|
||||
assets[i].Variants = append(assets[i].Variants, "fxdependent")
|
||||
case winVersionRe.MatchString(lower):
|
||||
assets[i].Variants = append(assets[i].Variants, "win-version-specific")
|
||||
case strings.HasSuffix(lower, ".appimage"):
|
||||
assets[i].Variants = append(assets[i].Variants, "appimage")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
// Package sttr provides variant tagging for sttr releases.
|
||||
//
|
||||
// sttr_Darwin_all.tar.gz is the only macOS release — a universal binary
|
||||
// with no arch token. Mark it universal2 so expandUniversal serves it
|
||||
// to both arm64 and amd64 Mac users.
|
||||
// sttr ships a darwin_all (universal macOS) archive alongside per-arch builds.
|
||||
// These universal archives have no arch in the filename — Go classifies them as
|
||||
// os="darwin", arch="" which the Node builds-cacher rejects with FORMAT CHANGE
|
||||
// (Node's classifier extracts a different arch from "all"). Production Node
|
||||
// also stores these as os="", arch="" (unroutable).
|
||||
//
|
||||
// .sbom.json files are software bill-of-materials metadata — not installable
|
||||
// archives. They pass through the format filter (ext="") but should not be
|
||||
// served.
|
||||
package sttrdist
|
||||
|
||||
import (
|
||||
@@ -11,11 +17,20 @@ import (
|
||||
"github.com/webinstall/webi-installers/internal/storage"
|
||||
)
|
||||
|
||||
// TagVariants tags sttr-specific build variants.
|
||||
// TagVariants tags sttr-specific build variants for exclusion from legacy export.
|
||||
func TagVariants(assets []storage.Asset) {
|
||||
for i := range assets {
|
||||
if strings.Contains(strings.ToLower(assets[i].Filename), "darwin_all") {
|
||||
assets[i].Arch = "universal2"
|
||||
lower := strings.ToLower(assets[i].Filename)
|
||||
// darwin_all / Darwin_all: universal macOS archive with no arch info.
|
||||
// Node's classifier extracts a different result → FORMAT CHANGE.
|
||||
// Production LIVE_cache has these as os="", arch="" (unroutable).
|
||||
if strings.Contains(lower, "darwin_all") {
|
||||
assets[i].Variants = append(assets[i].Variants, "universal-all")
|
||||
continue
|
||||
}
|
||||
// .sbom.json: software bill-of-materials, not an installable archive.
|
||||
if strings.HasSuffix(lower, ".sbom.json") {
|
||||
assets[i].Variants = append(assets[i].Variants, "metadata")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
github_releases = lsd-rs/lsd
|
||||
variants = msvc
|
||||
|
||||
@@ -2,67 +2,62 @@
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
__init_ollama() {
|
||||
set -e
|
||||
set -u
|
||||
set -e
|
||||
set -u
|
||||
|
||||
##################
|
||||
# Install ollama #
|
||||
##################
|
||||
##################
|
||||
# Install ollama #
|
||||
##################
|
||||
|
||||
# Every package should define these 6 variables
|
||||
pkg_cmd_name="ollama"
|
||||
# Every package should define these 6 variables
|
||||
pkg_cmd_name="ollama"
|
||||
|
||||
pkg_dst_dir="${HOME}/.local/opt/ollama"
|
||||
pkg_dst_cmd="${HOME}/.local/bin/ollama"
|
||||
pkg_dst_cmd="${HOME}/.local/opt/ollama/bin/ollama"
|
||||
pkg_dst_dir="${HOME}/.local/opt/ollama"
|
||||
pkg_dst="${pkg_dst_dir}"
|
||||
|
||||
pkg_src_dir="${HOME}/.local/opt/ollama-v${WEBI_VERSION}"
|
||||
pkg_src_cmd="${HOME}/.local/opt/ollama-v${WEBI_VERSION}/bin/ollama"
|
||||
pkg_src_cmd="${HOME}/.local/opt/ollama-v${WEBI_VERSION}/bin/ollama"
|
||||
pkg_src_dir="${HOME}/.local/opt/ollama-v${WEBI_VERSION}"
|
||||
pkg_src="${pkg_src_dir}"
|
||||
|
||||
my_os=$(uname -s)
|
||||
if test "Darwin" = "${my_os}"; then
|
||||
pkg_dst_cmd="${HOME}/.local/bin/ollama"
|
||||
pkg_src_cmd="${HOME}/.local/opt/ollama-v${WEBI_VERSION}/ollama"
|
||||
fi
|
||||
# pkg_install must be defined by every package
|
||||
pkg_install() {
|
||||
# ~/.local/opt/
|
||||
mkdir -p "$(dirname "${pkg_src_dir}")"
|
||||
|
||||
pkg_dst="${pkg_dst_cmd}"
|
||||
pkg_src="${pkg_src_cmd}"
|
||||
if test -d ./ollama-*/; then
|
||||
# the de facto way (in case it's supported in the future)
|
||||
# mv ./ollama-*/ ~/.local/opt/ollama-v3.27.0/
|
||||
mv ./ollama-*/ "${pkg_src}"
|
||||
elif test -d ./bin; then
|
||||
# how linux is presently done
|
||||
mkdir -p "${pkg_src_dir}"
|
||||
mv ./bin "${pkg_src_dir}"
|
||||
if test -f ./lib; then
|
||||
mv ./lib "${pkg_src_dir}"
|
||||
fi
|
||||
else
|
||||
# how macOS is presently done
|
||||
mkdir -p "$(dirname "${pkg_src_cmd}")"
|
||||
mv ./ollama-* "${pkg_src_cmd}"
|
||||
fi
|
||||
|
||||
# pkg_install must be defined by every package
|
||||
pkg_install() {
|
||||
if test -d ./bin; then
|
||||
# linux tar.zst: bin/ollama + lib/ollama/
|
||||
mkdir -p "${pkg_src_dir}"
|
||||
mv ./bin "${pkg_src_dir}/bin"
|
||||
if test -d ./lib; then
|
||||
mv ./lib "${pkg_src_dir}/lib"
|
||||
fi
|
||||
elif test -f ./ollama; then
|
||||
# macOS tgz: flat — bare binary + dylibs/mlx backends in root
|
||||
mkdir -p "${pkg_src_dir}"
|
||||
mv ./* "${pkg_src_dir}/"
|
||||
elif test -d ./Ollama.app; then
|
||||
# macOS zip: install app bundle to /Applications
|
||||
mv -f ./Ollama.app /Applications/Ollama.app
|
||||
elif test -f ./ollama-*; then
|
||||
# older bare binary format
|
||||
mkdir -p "$(dirname "${pkg_src_cmd}")"
|
||||
mv ./ollama-* "${pkg_src_cmd}"
|
||||
else
|
||||
echo "error: unrecognized ollama archive format" >&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
# remove previous location
|
||||
if test -f ~/.local/bin/ollama; then
|
||||
rm ~/.local/bin/ollama
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_get_current_version() {
|
||||
# 'ollama --version' has output in this format:
|
||||
# ollama version is 0.3.10
|
||||
# This trims it down to just the version number:
|
||||
# 0.3.10
|
||||
ollama --version 2> /dev/null |
|
||||
head -n 1 |
|
||||
cut -d' ' -f4 |
|
||||
sed 's:^v::'
|
||||
}
|
||||
pkg_get_current_version() {
|
||||
# 'ollama --version' has output in this format:
|
||||
# ollama version is 0.3.10
|
||||
# This trims it down to just the version number:
|
||||
# 0.3.10
|
||||
ollama --version 2> /dev/null |
|
||||
head -n 1 |
|
||||
cut -d' ' -f4 |
|
||||
sed 's:^v::'
|
||||
}
|
||||
}
|
||||
|
||||
__init_ollama
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
github_releases = jmorganca/ollama
|
||||
variants = mlx rocm jetpack5 jetpack6
|
||||
variants = rocm jetpack5 jetpack6
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
github_releases = powershell/powershell
|
||||
variants = fxdependent fxdependentWinDesktop appimage
|
||||
variants = fxdependent fxdependentWinDesktop
|
||||
|
||||
@@ -13,20 +13,12 @@ g_remote_bin="~/bin/${g_bin}"
|
||||
case "${g_host}" in
|
||||
beta.webi.sh) g_remote_conf="~/srv/beta.webinstall.dev/installers/" ;;
|
||||
next.webi.sh) g_remote_conf="~/srv/next.webinstall.dev/installers/" ;;
|
||||
webi.sh) g_remote_conf="~/srv/webinstall.dev/installers/" ;;
|
||||
*) g_remote_conf="~/srv/webinstall.dev/installers/" ;;
|
||||
*) g_remote_conf="~/srv/webid/installers/" ;;
|
||||
esac
|
||||
|
||||
fn_build() {
|
||||
b_tag="$(git describe --tags --abbrev=0 --match 'cmd/webicached/*' 2> /dev/null || echo 'cmd/webicached/v0.0.0')"
|
||||
b_tag_ver="$(printf '%s' "${b_tag}" | sed 's:^cmd/webicached/::')"
|
||||
b_count="$(git log --oneline "${b_tag}..HEAD" -- cmd/ internal/ 2> /dev/null | wc -l | tr -d ' \t')"
|
||||
b_version="$(git describe --tags --always 2> /dev/null || echo '0.0.0-dev')"
|
||||
b_commit="$(git rev-parse --short HEAD)"
|
||||
if test "${b_count}" -gt 0; then
|
||||
b_version="${b_tag_ver}-${b_count}-g${b_commit}"
|
||||
else
|
||||
b_version="${b_tag_ver}"
|
||||
fi
|
||||
b_date="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
||||
b_ldflags="-X main.version=${b_version} -X main.commit=${b_commit} -X main.date=${b_date}"
|
||||
|
||||
@@ -44,7 +36,7 @@ fn_deploy() {
|
||||
|
||||
printf 'Syncing releases.conf files...\n'
|
||||
rsync -av \
|
||||
--exclude='_cache' --exclude='.git' --exclude='agents' \
|
||||
--exclude='_cache' --exclude='.git' --exclude='.claude' --exclude='agents' \
|
||||
--exclude='bin' --exclude='cmd' --exclude='internal' \
|
||||
--exclude='docs' --exclude='scripts' --exclude='node_modules' \
|
||||
--include='*/' --include='releases.conf' --exclude='*' \
|
||||
|
||||
@@ -22,11 +22,11 @@ __init_sd() {
|
||||
pkg_install() {
|
||||
# mv ./sd-*/sd "$pkg_src_cmd"
|
||||
if test -f sd-*; then
|
||||
# old format: bare binary named sd-{triplet}
|
||||
# ~/.local/opt/sd-v0.99.9/bin
|
||||
mkdir -p "$(dirname "$pkg_src_cmd")"
|
||||
mv sd-* "$pkg_src_cmd"
|
||||
elif test -f sd-*/sd; then
|
||||
# current format: sd-v{ver}-{triplet}/ directory
|
||||
# ~/.local/opt/sd-v0.99.9/bin
|
||||
mkdir -p "$(dirname "$pkg_src_cmd")"
|
||||
mv sd-*/sd "$pkg_src_cmd"
|
||||
if test -f sd-*/sd.1; then
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
github_releases = abhimanyu003/sttr
|
||||
exclude = .sbom.json
|
||||
variants = .pkg.tar.
|
||||
|
||||
@@ -11,7 +11,6 @@ __rmrf_local() {
|
||||
archiver \
|
||||
awless \
|
||||
bat \
|
||||
btop \
|
||||
caddy \
|
||||
chromedriver \
|
||||
cmake \
|
||||
|
||||
@@ -4,34 +4,34 @@ set -u
|
||||
|
||||
__init_yq() {
|
||||
|
||||
pkg_cmd_name="yq"
|
||||
pkg_cmd_name="yq"
|
||||
|
||||
pkg_dst_cmd="$HOME/.local/bin/yq"
|
||||
pkg_dst="$pkg_dst_cmd"
|
||||
pkg_dst_cmd="$HOME/.local/bin/yq"
|
||||
pkg_dst="$pkg_dst_cmd"
|
||||
|
||||
pkg_src_cmd="$HOME/.local/opt/yq-v$WEBI_VERSION/bin/yq"
|
||||
pkg_src_dir="$HOME/.local/opt/yq-v$WEBI_VERSION"
|
||||
pkg_src="$pkg_src_cmd"
|
||||
pkg_src_cmd="$HOME/.local/opt/yq-v$WEBI_VERSION/bin/yq"
|
||||
pkg_src_dir="$HOME/.local/opt/yq-v$WEBI_VERSION"
|
||||
pkg_src="$pkg_src_cmd"
|
||||
|
||||
pkg_install() {
|
||||
mkdir -p "$(dirname "$pkg_src_cmd")"
|
||||
# yq_linux_amd64.tar.gz contains:
|
||||
# - yq_linux_amd64
|
||||
# - yq.1
|
||||
# - install-man-page.sh
|
||||
if [ -e ./yq.1 ]; then
|
||||
mkdir -p ~/.local/share/man/man1
|
||||
mv ./yq.1 ~/.local/share/man/man1/
|
||||
fi
|
||||
mv ./"$pkg_cmd_name"* "$pkg_src_cmd"
|
||||
chmod a+x "$pkg_src_cmd"
|
||||
}
|
||||
pkg_install() {
|
||||
mkdir -p "$(dirname "$pkg_src_cmd")"
|
||||
# yq_linux_amd64.tar.gz contains:
|
||||
# - yq_linux_amd64
|
||||
# - yq.1
|
||||
# - install-man-page.sh
|
||||
if [ -e ./yq.1 ]; then
|
||||
mkdir -p ~/.local/share/man/man1
|
||||
mv ./yq.1 ~/.local/share/man/man1/
|
||||
fi
|
||||
mv ./"$pkg_cmd_name"* "$pkg_src_cmd"
|
||||
chmod a+x "$pkg_src_cmd"
|
||||
}
|
||||
|
||||
pkg_get_current_version() {
|
||||
yq --version 2> /dev/null |
|
||||
head -n 1 |
|
||||
cut -d ' ' -f 2
|
||||
}
|
||||
pkg_get_current_version() {
|
||||
yq --version 2> /dev/null |
|
||||
head -n 1 |
|
||||
cut -d ' ' -f 2
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user