Compare commits

..
Author SHA1 Message Date
Linus Gasser 73d6196e7a Adding devbox and compile xgettext on Mac
continuous-integration/drone/pr Build is passing
Devbox is a nice shell-configuration tool which replaces your PATH
to point to nix-installed packages:

https://www.jetify.com/docs/devbox/installing-devbox

This allows to have a well-defined developer environment.

This also changes the Makefile to compile xgettext, because the
download of the binary only works for Linux.
2026-06-13 21:54:50 +02:00
47 changed files with 562 additions and 1072 deletions
+6 -11
View File
@@ -8,17 +8,12 @@ steps:
- make check
- name: xgettext-go
image: golang:1.26
environment:
GOPRIVATE: coopcloud.tech
commands:
- go run git.coopcloud.tech/toolshed/xgettext-go@latest
-o pkg/i18n/locales/abra.pot
--keyword=i18n.G
--keyword-ctx=i18n.GC
--sort-output
--add-comments-tag="translators"
$(find . -name "*.go" -not -path "*vendor*" | sort)
image: git.coopcloud.tech/toolshed/drone-xgettext-go:latest
settings:
keyword: i18n.G
keyword_ctx: i18n.GC
out: pkg/i18n/locales/abra.pot
comments_tag: translators
depends_on:
- make check
when:
+1
View File
@@ -0,0 +1 @@
devbox.lock binary linguist-generated=true
+7 -44
View File
@@ -1,5 +1,5 @@
ABRA := ./cmd/abra
XGETTEXT := go run git.coopcloud.tech/toolshed/xgettext-go@latest
XGETTEXT := xgettext-go
COMMIT := $(shell git rev-list -1 HEAD)
GOPATH := $(shell go env GOPATH)
GOVERSION := 1.26
@@ -62,7 +62,7 @@ update-po:
done
.PHONY: update-pot
update-pot:
update-pot: xgettext-go
@$(XGETTEXT) \
-o pkg/i18n/locales/$(DOMAIN).pot \
--keyword=i18n.G \
@@ -71,6 +71,11 @@ update-pot:
--add-comments-tag="translators" \
$$(find . -name "*.go" -not -path "*vendor*" | sort)
.PHONY: xgettext-go
xgettext-go:
@command -v $(XGETTEXT) >/dev/null 2>&1 || \
go install git.coopcloud.tech/toolshed/xgettext-go@latest
.PHONY: update-pot-po-metadata
update-pot-po-metadata:
@sed -i "s/charset=CHARSET/charset=UTF-8/g" pkg/i18n/locales/*.po pkg/i18n/locales/*.pot
@@ -84,45 +89,3 @@ build-mo:
release:
@goreleaser release --clean
CLIENT_VM := abra-client
vm-client-status:
sudo systemctl status microvm@$(CLIENT_VM).service
vm-client-create:test-integration-hosts
sudo microvm -f git+file://$$(pwd) -c $(CLIENT_VM)
vm-client-start:
sudo systemctl start microvm@$(CLIENT_VM).service
vm-client-update:test-integration-hosts
sudo microvm -R -f git+file://$$(pwd) -u $(CLIENT_VM)
vm-client-run:
sudo microvm -f git+file://$$(pwd) -r $(CLIENT_VM)
vm-client-stop:
sudo systemctl stop microvm@$(CLIENT_VM)
vm-client-delete: vm-client-stop
sudo rm -rf /var/lib/microvms/$(CLIENT_VM)
vm-client-connect:
ssh abra@10.0.0.2 -i ./tests/resources/local_integration_ssh
SERVER_VM := abra-server
vm-server-status:
sudo systemctl status microvm@$(SERVER_VM).service
vm-server-create:
sudo microvm -f git+file://$$(pwd) -c $(SERVER_VM)
vm-server-start:
sudo systemctl start microvm@$(SERVER_VM).service
vm-server-update:
sudo microvm -R -f git+file://$$(pwd) -u $(SERVER_VM)
vm-server-run:
sudo microvm -f git+file://$$(pwd) -r $(SERVER_VM)
vm-server-stop:
sudo systemctl stop microvm@$(SERVER_VM)
vm-server-delete: vm-server-stop
sudo rm -rf /var/lib/microvms/$(SERVER_VM)
vm-server-connect:
ssh abra@10.0.0.3 -i ./tests/resources/local_integration_ssh
test-integration-hosts:
./scripts/tests/extra_hosts
test-integration:
ssh-add ./tests/resources/local_integration_ssh
@bats -Tp tests/integration --verbose-run
+5 -6
View File
@@ -151,12 +151,11 @@ checkout as-is. Recipe commit hashes are also supported as values for
stackName := app.StackName()
deployOpts := stack.Deploy{
Composefiles: composeFiles,
Namespace: stackName,
Prune: false,
ResolveImage: stack.ResolveImageAlways,
Detach: false,
SendRegistryAuth: true,
Composefiles: composeFiles,
Namespace: stackName,
Prune: false,
ResolveImage: stack.ResolveImageAlways,
Detach: false,
}
compose, err := appPkg.GetAppComposeConfig(app.Name, deployOpts, app.Env)
if err != nil {
+5 -6
View File
@@ -166,12 +166,11 @@ beforehand. See "abra app backup" for more.`),
stackName := app.StackName()
deployOpts := stack.Deploy{
Composefiles: composeFiles,
Namespace: stackName,
Prune: false,
ResolveImage: stack.ResolveImageAlways,
Detach: false,
SendRegistryAuth: true,
Composefiles: composeFiles,
Namespace: stackName,
Prune: false,
ResolveImage: stack.ResolveImageAlways,
Detach: false,
}
compose, err := appPkg.GetAppComposeConfig(app.Name, deployOpts, app.Env)
+5 -6
View File
@@ -178,12 +178,11 @@ beforehand. See "abra app backup" for more.`),
stackName := app.StackName()
deployOpts := stack.Deploy{
Composefiles: composeFiles,
Namespace: stackName,
Prune: false,
ResolveImage: stack.ResolveImageAlways,
Detach: false,
SendRegistryAuth: true,
Composefiles: composeFiles,
Namespace: stackName,
Prune: false,
ResolveImage: stack.ResolveImageAlways,
Detach: false,
}
compose, err := appPkg.GetAppComposeConfig(app.Name, deployOpts, app.Env)
+28
View File
@@ -0,0 +1,28 @@
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.17.2/.schema/devbox.schema.json",
"packages": [
"go@1.26",
"gnumake@latest",
"gettext@latest"
],
"env": {
"GOPATH": "$PWD/.devbox",
"PATH": "$PWD/.devbox/bin:$PATH"
},
"shell": {
"init_hook": [
"mkdir -p .devbox/bin"
],
"scripts": {
"xgettext-go": [
"go install git.coopcloud.tech/toolshed/xgettext-go@latest"
],
"build": [
"make build"
],
"test": [
"make test"
]
}
}
}
Generated
+265
View File
@@ -0,0 +1,265 @@
{
"lockfile_version": "1",
"packages": {
"gettext@latest": {
"last_modified": "2026-05-21T08:15:18Z",
"resolved": "github:NixOS/nixpkgs/4a29d733e8a7d5b824c3d8c958a946a9867b3eb2#gettext",
"source": "devbox-search",
"version": "1.0",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/i5aw4v15lklq5r5w5clvcy8dxc2igjck-gettext-1.0",
"default": true
},
{
"name": "man",
"path": "/nix/store/17g5cqxvbkxivmfd39ppvyc0rx1wpcn8-gettext-1.0-man",
"default": true
},
{
"name": "doc",
"path": "/nix/store/kfx0dvvkmyw91jbqnp58yhzlxqi1xyi0-gettext-1.0-doc"
},
{
"name": "info",
"path": "/nix/store/d14xspsnm4xj9w8yicrj50xmhs8bb5s2-gettext-1.0-info"
}
],
"store_path": "/nix/store/i5aw4v15lklq5r5w5clvcy8dxc2igjck-gettext-1.0"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/jdqf3kqpj22agyhakrk5gklvzc6fxp3l-gettext-1.0",
"default": true
},
{
"name": "man",
"path": "/nix/store/axz6675qpbr93bbs1hfz60m0dm1i01mg-gettext-1.0-man",
"default": true
},
{
"name": "doc",
"path": "/nix/store/5wckc0cg4l9wbmaqsi08rrmc09q7mxym-gettext-1.0-doc"
},
{
"name": "info",
"path": "/nix/store/fd0d7h9y3kvp9i3x172lsj3x5ffz6sh7-gettext-1.0-info"
}
],
"store_path": "/nix/store/jdqf3kqpj22agyhakrk5gklvzc6fxp3l-gettext-1.0"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/f46icmrv0rpaykfxs313d4g17g0jxn02-gettext-1.0",
"default": true
},
{
"name": "man",
"path": "/nix/store/nk8dbg526a7lmsr4x41nbj3hizjk7f6k-gettext-1.0-man",
"default": true
},
{
"name": "doc",
"path": "/nix/store/w0wgn2f7ha2kp5ank9ymf1l8mlfki30a-gettext-1.0-doc"
},
{
"name": "info",
"path": "/nix/store/cvp75qjcdjh8xrhzhrrdc62dyfil1f5j-gettext-1.0-info"
}
],
"store_path": "/nix/store/f46icmrv0rpaykfxs313d4g17g0jxn02-gettext-1.0"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/rb8rna9gkhs0ybl6z2p904myslh8llg8-gettext-1.0",
"default": true
},
{
"name": "man",
"path": "/nix/store/ck224axif94df161wk7b0wzwm035747f-gettext-1.0-man",
"default": true
},
{
"name": "doc",
"path": "/nix/store/2lp7blpw8ahc683287gbnp6vn4i9p9q4-gettext-1.0-doc"
},
{
"name": "info",
"path": "/nix/store/33xaaniyh3qk6mq75dzx7v9c55n21i3p-gettext-1.0-info"
}
],
"store_path": "/nix/store/rb8rna9gkhs0ybl6z2p904myslh8llg8-gettext-1.0"
}
}
},
"github:NixOS/nixpkgs/nixpkgs-unstable": {
"last_modified": "2026-05-27T10:28:13Z",
"resolved": "github:NixOS/nixpkgs/4100e830e085863741bc69b156ec4ccd53ab5be0?lastModified=1779877693&narHash=sha256-NOF9NAREhxr50bbBfVcVOq%2BArCMSoe8dP79Pk2uyARk%3D"
},
"gnumake@latest": {
"last_modified": "2026-05-27T10:28:13Z",
"resolved": "github:NixOS/nixpkgs/4100e830e085863741bc69b156ec4ccd53ab5be0#gnumake",
"source": "devbox-search",
"version": "4.4.1",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/8wwiw8pwyhrkzyq28hqzxfl4z84lks81-gnumake-4.4.1",
"default": true
},
{
"name": "man",
"path": "/nix/store/wdm9prq35jlgwq6rjyhqxy4jzy833sfr-gnumake-4.4.1-man",
"default": true
},
{
"name": "info",
"path": "/nix/store/6dbp1ysgxsrrn7xgjgf523faqrm605a5-gnumake-4.4.1-info"
},
{
"name": "doc",
"path": "/nix/store/sl2ygvgjg4ml8dhyfxj5kh84x2bs1mhc-gnumake-4.4.1-doc"
}
],
"store_path": "/nix/store/8wwiw8pwyhrkzyq28hqzxfl4z84lks81-gnumake-4.4.1"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/9ngw1ippk25jjj5fjxv36xbp6iq7rxdx-gnumake-4.4.1",
"default": true
},
{
"name": "man",
"path": "/nix/store/dg3aa71vii59scbfhi02cdxnps64x6ql-gnumake-4.4.1-man",
"default": true
},
{
"name": "debug",
"path": "/nix/store/mdv67w2xvchbs76zjdzppdkk64z5avki-gnumake-4.4.1-debug"
},
{
"name": "doc",
"path": "/nix/store/bybbj9avk3g107mwhgvkzkpm6mkbl8gv-gnumake-4.4.1-doc"
},
{
"name": "info",
"path": "/nix/store/bxdqxx2q13sj15ss8z5l33jd31x55j5l-gnumake-4.4.1-info"
}
],
"store_path": "/nix/store/9ngw1ippk25jjj5fjxv36xbp6iq7rxdx-gnumake-4.4.1"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/60y2hs45l18g56ykw9789b5vhhi2ls5q-gnumake-4.4.1",
"default": true
},
{
"name": "man",
"path": "/nix/store/m2ba4bwmfgh994xbg1iqm6zj1mdrq8h7-gnumake-4.4.1-man",
"default": true
},
{
"name": "info",
"path": "/nix/store/apljbm6plyajbfrnwif0a2d4nx6w0cpf-gnumake-4.4.1-info"
},
{
"name": "doc",
"path": "/nix/store/s9y438l347nky6rkl1wfk2y3b0d9i636-gnumake-4.4.1-doc"
}
],
"store_path": "/nix/store/60y2hs45l18g56ykw9789b5vhhi2ls5q-gnumake-4.4.1"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/d3bwqm6bymhy3pdgbvf7vxjqfp31m3j1-gnumake-4.4.1",
"default": true
},
{
"name": "man",
"path": "/nix/store/bmvqa5ym318mymhxlwwmxq8wxal958p4-gnumake-4.4.1-man",
"default": true
},
{
"name": "debug",
"path": "/nix/store/q683z843wi7xs96pngh1kinnx88vn2if-gnumake-4.4.1-debug"
},
{
"name": "doc",
"path": "/nix/store/wxg27bzsljjw4k72m9b2v6a0fx5a68s0-gnumake-4.4.1-doc"
},
{
"name": "info",
"path": "/nix/store/03d41qgjsrhcr3fzq2z99ry07rahnj0v-gnumake-4.4.1-info"
}
],
"store_path": "/nix/store/d3bwqm6bymhy3pdgbvf7vxjqfp31m3j1-gnumake-4.4.1"
}
}
},
"go@1.26": {
"last_modified": "2026-05-21T08:15:18Z",
"resolved": "github:NixOS/nixpkgs/4a29d733e8a7d5b824c3d8c958a946a9867b3eb2#go",
"source": "devbox-search",
"version": "1.26.3",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/7ycp8j45iay38g9mjaxmy4jhwdsrb47y-go-1.26.3",
"default": true
}
],
"store_path": "/nix/store/7ycp8j45iay38g9mjaxmy4jhwdsrb47y-go-1.26.3"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/jkcwcbwvhgzmxg59798z4clmj4bfv42i-go-1.26.3",
"default": true
}
],
"store_path": "/nix/store/jkcwcbwvhgzmxg59798z4clmj4bfv42i-go-1.26.3"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/3f2jzvxmhhlarjqxy1p7i9r5l34siz29-go-1.26.3",
"default": true
}
],
"store_path": "/nix/store/3f2jzvxmhhlarjqxy1p7i9r5l34siz29-go-1.26.3"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/33fw5m31lfcnk4ff2f0df7j2bxnh8lgk-go-1.26.3",
"default": true
}
],
"store_path": "/nix/store/33fw5m31lfcnk4ff2f0df7j2bxnh8lgk-go-1.26.3"
}
}
}
}
}
Generated
-38
View File
@@ -18,27 +18,6 @@
"type": "github"
}
},
"microvm": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"spectrum": "spectrum"
},
"locked": {
"lastModified": 1784666190,
"narHash": "sha256-xgfS6slV7J3baMooNN1UuBi51RIgg9y0DbCxfSA0668=",
"owner": "astro",
"repo": "microvm.nix",
"rev": "fa5340ac684cdce8a22b6d4a0bcebb0cc999275e",
"type": "github"
},
"original": {
"owner": "astro",
"repo": "microvm.nix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1778443072,
@@ -58,26 +37,9 @@
"root": {
"inputs": {
"flake-utils": "flake-utils",
"microvm": "microvm",
"nixpkgs": "nixpkgs"
}
},
"spectrum": {
"flake": false,
"locked": {
"lastModified": 1783694892,
"narHash": "sha256-xO8f7Qng+18FK2UlB9vcrkxCaQMCt5WjCH24aW/11eg=",
"ref": "refs/heads/main",
"rev": "24c4346e30fdea8d8e80f34aec3554a15a667d24",
"revCount": 1410,
"type": "git",
"url": "https://spectrum-os.org/git/spectrum"
},
"original": {
"type": "git",
"url": "https://spectrum-os.org/git/spectrum"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
+18 -87
View File
@@ -4,103 +4,34 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
microvm = {
url = "github:astro/microvm.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
microvm,
flake-utils,
}:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
publicKey = builtins.readFile ./tests/resources/local_integration_ssh.pub;
privateKey = builtins.readFile ./tests/resources/local_integration_ssh;
pathToRepo = builtins.readFile ./tests/resources/path_to_repo;
# local DNS aliases for the server host
extraHosts = builtins.readFile ./tests/resources/extra_hosts;
username = "abra";
password = "abra";
defaultDNS = [
# Quad9.net
"9.9.9.9"
"149.112.112.112"
"2620:fe::fe"
"2620:fe::9"
];
in
{
nixosConfigurations = {
abra-client = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
microvm.nixosModules.microvm
./nix/hosts/client/configuration.nix
];
specialArgs = {
inherit
publicKey
privateKey
username
password
defaultDNS
extraHosts
pathToRepo
;
};
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages = rec {
abra = pkgs.callPackage ./package.nix { };
default = abra;
};
abra-server = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
microvm.nixosModules.microvm
./nix/hosts/server/configuration.nix
];
specialArgs = {
inherit
publicKey
privateKey
username
password
defaultDNS
;
};
apps = rec {
abra = flake-utils.lib.mkApp { drv = self.packages.${system}.abra; };
default = abra;
};
};
nixosModules = rec {
host = {
imports = [
microvm.nixosModules.host
./nix/modules/host.nix
devShells.default = pkgs.mkShell {
packages = with pkgs; [
go_1_26
gnumake
];
};
default = host;
};
packages = rec {
abra = pkgs.callPackage ./nix/package.nix { };
default = abra;
};
apps = rec {
abra = flake-utils.lib.mkApp { drv = self.packages.${system}.abra; };
default = abra;
};
devShells.${system}.default = pkgs.mkShell {
# testing env variables
BATS_LIB_PATH = "~/.local/share/bats/";
TEST_SERVER = "abra.local";
ABRA_DIR = "$HOME/.abra_test";
packages = with pkgs; [
go_1_26
gnumake
gopls
];
};
};
}
);
}
+2 -2
View File
@@ -19,7 +19,7 @@ require (
github.com/moby/sys/signal v0.7.1
github.com/moby/term v0.5.2
github.com/pkg/errors v0.9.1
github.com/schollz/progressbar/v3 v3.19.1
github.com/schollz/progressbar/v3 v3.19.0
golang.org/x/term v0.44.0
gopkg.in/yaml.v3 v3.0.1
gotest.tools/v3 v3.5.2
@@ -77,7 +77,7 @@ require (
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/lucasb-eyer/go-colorful v1.4.0 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.22 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.21 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
+5 -4
View File
@@ -623,8 +623,8 @@ github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHP
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.22 h1:j8l17JJ9i6VGPUFUYoTUKPSgKe/83EYU2zBC7YNKMw4=
github.com/mattn/go-isatty v0.0.22/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4=
github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88=
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
@@ -808,8 +808,8 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/schollz/progressbar/v3 v3.19.1 h1:iv8BgwOvdML/S3p84uBpy/IMigv4U9594vPZYa2EdrU=
github.com/schollz/progressbar/v3 v3.19.1/go.mod h1:LFL7jqimKxfhero4K1eCkUr/6R39AgQeiPCJtlTWIW8=
github.com/schollz/progressbar/v3 v3.19.0 h1:Ea18xuIRQXLAUidVDox3AbwfUhD0/1IvohyTutOIFoc=
github.com/schollz/progressbar/v3 v3.19.0/go.mod h1:IsO3lpbaGuzh8zIMzgY3+J8l4C8GjO0Y9S69eFvNsec=
github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U=
github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo=
github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg=
@@ -1139,6 +1139,7 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw=
golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
-72
View File
@@ -1,72 +0,0 @@
# Hosts
These hosts are VMs used for running the integration tests on your local machine.
The hosts contain a client where abra with the tests will be run and a server
to simulate a remote machine.
## Prepare the host
For this setup to work you need a machine with NixOS and flakes enabled.
1. Import the abra flake
The install example is based on the [using nix flakes wiki page](https://nixos.wiki/wiki/flakes#Using_nix_flakes_with_NixOS).
```nix
inputs = {
abra = {
url = "git+https://git.coopcloud.tech/toolshed/abra.git";
};
};
```
2. Add the host module to your configuration
Now add the host module to your configuration. At the toplevel of a flake it could look like this:
```nix
desktop = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
abra.nixosModules.host
./configuration.nix
];
specialArgs = inputs;
};
```
3. Adjust the required config
```nix
abra.testing = {
enable = true; # loads the required config, when set true
externalInterface = "eth1"; # adjust this to your network interface that has access to the internet
};
```
You can look up the interface with `ip link`. After that rebuild your system and you are ready to go.
## Get started
All commands are run on the repository root path.
1. Set path to repo
The VM will create a shared volume from the content of the file `tests/resources/path_to_repo`.
Set the content of the file to the path of your abra repository.
This will share the repository from your machine with the VM and you can edit files while testing without rebuiling
or restarting the VM.
2. Create the VMs
```sh
make vm-client-create
make vm-server-create
```
3. Start the VMs
```sh
make vm-client-start
make vm-server-start
```
After running that command you should be able to ping the machines.
The client runs on 10.0.0.2 and server 10.0.0.3
4. Connect to the client
Running the following command will connect to the client VM via SSH.
```sh
make vm-client-connect
```
5. Run the tests
```sh
make test-integration
```
-145
View File
@@ -1,145 +0,0 @@
{
lib,
pkgs,
publicKey,
username,
pathToRepo,
defaultDNS,
extraHosts,
...
}:
let
index = 2;
mac = "00:00:00:00:00:01";
serverIp = "10.0.0.3";
in
{
imports = [
../../modules/ssh.nix
../../modules/user.nix
../../modules/docker.nix
];
microvm = {
vcpu = 4;
mem = 2049; # see issue related in microvm repo with 2048, so add 1MB
interfaces = [
{
id = "vm${toString index}";
type = "tap";
inherit mac;
}
];
shares = [
{
proto = "virtiofs";
tag = "repo";
# Source path can be absolute or relative
# to /var/lib/microvms/$hostName
source = "${lib.trim pathToRepo}";
mountPoint = "/home/${username}/abra";
}
];
};
boot.tmp = {
useTmpfs = true;
tmpfsSize = "2G";
};
networking = {
hostName = "abra-client";
useNetworkd = true;
};
systemd.network.networks."10-eth" = {
matchConfig.MACAddress = mac;
# Static IP configuration
address = [
"10.0.0.${toString index}/32"
"fec0::${lib.toHexString index}/128"
];
routes = [
{
# A route to the host
Destination = "10.0.0.0/32";
GatewayOnLink = true;
}
{
# Route to server
Destination = "${serverIp}/32";
Gateway = "10.0.0.0";
GatewayOnLink = true;
}
{
# Default route
Destination = "0.0.0.0/0";
Gateway = "10.0.0.0";
GatewayOnLink = true;
}
{
# Default route
Destination = "::/0";
Gateway = "fec0::";
GatewayOnLink = true;
}
];
networkConfig = {
# DNS servers no longer come from DHCP nor Router
# Advertisements. Perhaps you want to change the defaults:
DNS = defaultDNS;
};
};
# open the ports to allow ssh access from the host
networking.firewall.allowedTCPPorts = [ 22 ];
networking.firewall.allowedUDPPorts = [ 22 ];
networking.extraHosts = extraHosts;
environment.variables = {
CGO_ENABLED = 0;
TEST_SERVER = "abra.local";
ABRA_DIR = "$HOME/.abra_test";
};
programs.ssh = {
startAgent = true;
knownHostsFiles = [
(pkgs.writeText "local.keys" ''
abra.local ${publicKey}
'')
];
extraConfig = ''
Host abra.local
HostName abra.local
Port 22
User ${username}
'';
};
programs.git = {
enable = true;
# many recipe commands need a preset git user
config = [
{
user = {
name = "abra dev";
email = "helo@coopcloud.tech";
};
}
];
};
environment.systemPackages = with pkgs; [
# build dependencies, copied from flake.nix
go_1_26
gnumake
# testing dependencies
(bats.withLibraries (p: [
p.bats-assert
p.bats-file
p.bats-support
]))
jq
wget
];
}
-42
View File
@@ -1,42 +0,0 @@
{
serverIp,
username,
...
}:
{
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = username;
home.homeDirectory = "/home/${username}";
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "26.05";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
programs.ssh = {
enable = true;
enableDefaultConfig = false;
settings = {
"abra.local" = {
HostName = serverIp;
User = username;
Port = 22;
IdentityFile = "/home/${username}/abra/tests/resources/local_integration_ssh";
};
"*.abra.local" = {
HostName = serverIp;
User = username;
Port = 22;
IdentityFile = "/home/${username}/abra/tests/resources/local_integration_sshn";
};
};
};
}
-91
View File
@@ -1,91 +0,0 @@
{
lib,
defaultDNS,
...
}:
let
index = 3;
mac = "00:00:00:00:00:02";
clientIp = "10.0.0.2";
in
{
imports = [
../../modules/ssh.nix
../../modules/user.nix
../../modules/docker.nix
];
microvm = {
vcpu = 4;
mem = 8097; # see issue related in microvm repo with 2048, so add 1MB
interfaces = [
{
id = "vm${toString index}";
type = "tap";
inherit mac;
}
];
};
boot.tmp = {
useTmpfs = true;
tmpfsSize = "8G";
};
networking = {
hostName = "abra-server";
useNetworkd = true;
};
systemd.network.networks."11-eth" = {
matchConfig.MACAddress = mac;
# Static IP configuration
address = [
"10.0.0.${toString index}/32"
"fec0::${lib.toHexString index}/128"
];
routes = [
{
# A route to the host
Destination = "10.0.0.0/32";
GatewayOnLink = true;
}
{
# Route to server
Destination = "${clientIp}/32";
Gateway = "10.0.0.0";
GatewayOnLink = true;
}
{
# Default route
Destination = "0.0.0.0/0";
Gateway = "10.0.0.0";
GatewayOnLink = true;
}
{
# Default route
Destination = "::/0";
Gateway = "fec0::";
GatewayOnLink = true;
}
];
networkConfig = {
# DNS servers no longer come from DHCP nor Router
# Advertisements. Perhaps you want to change the defaults:
DNS = defaultDNS;
};
};
# open the ports to allow ssh access from the host
networking.firewall.allowedTCPPorts = [
22
80
443
1312 # deploy with udp and tcp on same port test
];
networking.firewall.allowedUDPPorts = [
22
80
443
1312 # deploy with udp and tcp on same port test
];
}
-7
View File
@@ -1,7 +0,0 @@
{ ... }:
{
virtualisation.docker = {
enable = true;
liveRestore = false;
};
}
-59
View File
@@ -1,59 +0,0 @@
{
lib,
config,
...
}:
let
maxVMs = 3;
in
{
options = {
abra.testing.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable the abra integration testing framework";
};
abra.testing.externalInterface = lib.mkOption {
type = lib.types.str;
default = null;
description = "Change this to the interface with upstream Internet access";
};
};
config = lib.mkIf config.abra.testing.enable {
networking.useNetworkd = true;
systemd.network.wait-online.enable = false;
systemd.network.networks = builtins.listToAttrs (
map (index: {
name = "30-vm${toString index}";
value = {
matchConfig.Name = "vm${toString index}";
# Host's addresses
address = [
"10.0.0.0/32"
"fec0::/128"
];
# Setup routes to the VM
routes = [
{
Destination = "10.0.0.${toString index}/32";
}
{
Destination = "fec0::${lib.toHexString index}/128";
}
];
# Enable routing
networkConfig = {
IPv4Forwarding = true;
IPv6Forwarding = true;
};
};
}) (lib.genList (i: i + 1) maxVMs)
);
networking.nat = {
enable = true;
internalIPs = [ "10.0.0.0/24" ];
externalInterface = config.abra.testing.externalInterface;
};
};
}
-33
View File
@@ -1,33 +0,0 @@
{
privateKey,
publicKey,
username,
...
}:
{
# default host key location
environment.etc."ssh/ssh_host_ed25519_key" = {
text = privateKey;
mode = "0600";
};
environment.etc."ssh/ssh_host_ed25519_key.pub" = {
text = publicKey;
mode = "0644";
};
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
AllowUsers = [ "${username}" ];
};
generateHostKeys = false;
hostKeys = [
{
path = "/etc/ssh/ssh_host_ed25519_key";
type = "ed25519";
}
];
};
}
-22
View File
@@ -1,22 +0,0 @@
{
username,
password,
publicKey,
...
}:
{
users.users."${username}" = {
isNormalUser = true;
password = password;
home = "/home/${username}";
description = "Abra user";
extraGroups = [
"wheel"
"networkmanager"
"docker"
];
openssh.authorizedKeys.keys = [
publicKey
];
};
}
View File
+56 -56
View File
@@ -7,7 +7,7 @@
msgid ""
msgstr "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL\n"
"POT-Creation-Date: 2026-06-14 17:56+0200\n"
"POT-Creation-Date: 2026-06-09 16:29+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -339,17 +339,17 @@ msgstr ""
msgid "%s is missing the TYPE env var?"
msgstr ""
#: ./cli/app/rollback.go:310 ./cli/app/rollback.go:314
#: ./cli/app/rollback.go:309 ./cli/app/rollback.go:313
#, c-format
msgid "%s is not a downgrade for %s?"
msgstr ""
#: ./cli/app/upgrade.go:430 ./cli/app/upgrade.go:434
#: ./cli/app/upgrade.go:429 ./cli/app/upgrade.go:433
#, c-format
msgid "%s is not an upgrade for %s?"
msgstr ""
#: ./cli/app/env.go:146 ./cli/app/logs.go:65 ./cli/app/ps.go:62 ./cli/app/restart.go:100 ./cli/app/services.go:55 ./cli/app/undeploy.go:66 ./cli/app/upgrade.go:451
#: ./cli/app/env.go:146 ./cli/app/logs.go:65 ./cli/app/ps.go:62 ./cli/app/restart.go:100 ./cli/app/services.go:55 ./cli/app/undeploy.go:66 ./cli/app/upgrade.go:450
#, c-format
msgid "%s is not deployed?"
msgstr ""
@@ -369,7 +369,7 @@ msgstr ""
msgid "%s missing context, run \"abra server add %s\"?"
msgstr ""
#: ./cli/app/deploy.go:195 ./cli/app/upgrade.go:211
#: ./cli/app/deploy.go:194 ./cli/app/upgrade.go:210
#, c-format
msgid "%s missing from %s.env"
msgstr ""
@@ -549,12 +549,12 @@ msgstr ""
msgid "%s: waiting %d seconds before next retry"
msgstr ""
#: ./cli/app/upgrade.go:425
#: ./cli/app/upgrade.go:424
#, c-format
msgid "'%s' is not a known version"
msgstr ""
#: ./cli/app/rollback.go:305 ./cli/app/upgrade.go:420
#: ./cli/app/rollback.go:304 ./cli/app/upgrade.go:419
#, c-format
msgid "'%s' is not a known version for %s"
msgstr ""
@@ -626,7 +626,7 @@ msgstr ""
msgid "Both local recipe and live deployment labels are shown."
msgstr ""
#: ./cli/app/backup.go:319 ./cli/app/backup.go:335 ./cli/app/check.go:95 ./cli/app/cmd.go:285 ./cli/app/cp.go:385 ./cli/app/deploy.go:415 ./cli/app/labels.go:143 ./cli/app/list.go:335 ./cli/app/new.go:411 ./cli/app/ps.go:213 ./cli/app/restart.go:163 ./cli/app/restore.go:138 ./cli/app/secret.go:569 ./cli/app/secret.go:609 ./cli/app/secret.go:633 ./cli/app/secret.go:641 ./cli/catalogue/catalogue.go:318 ./cli/recipe/lint.go:137
#: ./cli/app/backup.go:319 ./cli/app/backup.go:335 ./cli/app/check.go:95 ./cli/app/cmd.go:285 ./cli/app/cp.go:385 ./cli/app/deploy.go:414 ./cli/app/labels.go:143 ./cli/app/list.go:335 ./cli/app/new.go:411 ./cli/app/ps.go:213 ./cli/app/restart.go:163 ./cli/app/restore.go:138 ./cli/app/secret.go:569 ./cli/app/secret.go:609 ./cli/app/secret.go:633 ./cli/app/secret.go:641 ./cli/catalogue/catalogue.go:318 ./cli/recipe/lint.go:137
msgid "C"
msgstr ""
@@ -767,7 +767,7 @@ msgid "Creates a new app from a default recipe.\n"
"on your $PATH."
msgstr ""
#: ./cli/app/deploy.go:431 ./cli/app/new.go:387 ./cli/app/rollback.go:362 ./cli/app/upgrade.go:471
#: ./cli/app/deploy.go:430 ./cli/app/new.go:387 ./cli/app/rollback.go:361 ./cli/app/upgrade.go:470
msgid "D"
msgstr ""
@@ -1462,7 +1462,7 @@ msgid "To load completions:\n"
" # and source this file from your PowerShell profile."
msgstr ""
#: ./cli/app/deploy.go:455 ./cli/app/rollback.go:378 ./cli/app/upgrade.go:495
#: ./cli/app/deploy.go:454 ./cli/app/rollback.go:377 ./cli/app/upgrade.go:494
msgid "U"
msgstr ""
@@ -1835,7 +1835,7 @@ msgstr ""
msgid "attempting to run %s"
msgstr ""
#: ./cli/app/deploy.go:284 ./cli/app/upgrade.go:297
#: ./cli/app/deploy.go:283 ./cli/app/upgrade.go:296
#, c-format
msgid "attempting to run post deploy commands, saw: %s"
msgstr ""
@@ -1915,7 +1915,7 @@ msgstr ""
#. no spaces in between
#. translators: `abra app cp` aliases. use a comma separated list of aliases with
#. no spaces in between
#: ./cli/app/backup.go:148 ./cli/app/cp.go:30 ./cli/app/deploy.go:439 ./cli/app/rollback.go:370 ./cli/app/upgrade.go:479
#: ./cli/app/backup.go:148 ./cli/app/cp.go:30 ./cli/app/deploy.go:438 ./cli/app/rollback.go:369 ./cli/app/upgrade.go:478
msgid "c"
msgstr ""
@@ -1971,7 +1971,7 @@ msgstr ""
msgid "cannot redeploy previous chaos version (%s), did you mean to use \"--chaos\"?"
msgstr ""
#: ./cli/app/deploy.go:389
#: ./cli/app/deploy.go:388
#, c-format
msgid "cannot redeploy previous chaos version (%s), did you mean to use \"--chaos\"?\n"
" to return to a regular release, specify a release tag, commit SHA or use \"--latest\""
@@ -1990,7 +1990,7 @@ msgstr ""
msgid "cannot use '[secret] [version]' and '--all' together"
msgstr ""
#: ./cli/app/deploy.go:331
#: ./cli/app/deploy.go:330
msgid "cannot use --chaos and --latest together"
msgstr ""
@@ -2014,11 +2014,11 @@ msgstr ""
msgid "cannot use [service] and --all-services/-a together"
msgstr ""
#: ./cli/app/deploy.go:323 ./cli/app/new.go:80
#: ./cli/app/deploy.go:322 ./cli/app/new.go:80
msgid "cannot use [version] and --chaos together"
msgstr ""
#: ./cli/app/deploy.go:327
#: ./cli/app/deploy.go:326
msgid "cannot use [version] and --latest together"
msgstr ""
@@ -2054,7 +2054,7 @@ msgstr ""
msgid "cfg"
msgstr ""
#: ./cli/app/backup.go:318 ./cli/app/backup.go:334 ./cli/app/check.go:94 ./cli/app/cmd.go:284 ./cli/app/cp.go:384 ./cli/app/deploy.go:414 ./cli/app/labels.go:142 ./cli/app/list.go:334 ./cli/app/new.go:410 ./cli/app/ps.go:212 ./cli/app/restart.go:162 ./cli/app/restore.go:137 ./cli/app/secret.go:568 ./cli/app/secret.go:608 ./cli/app/secret.go:632 ./cli/app/secret.go:640 ./cli/catalogue/catalogue.go:317 ./cli/recipe/lint.go:136
#: ./cli/app/backup.go:318 ./cli/app/backup.go:334 ./cli/app/check.go:94 ./cli/app/cmd.go:284 ./cli/app/cp.go:384 ./cli/app/deploy.go:413 ./cli/app/labels.go:142 ./cli/app/list.go:334 ./cli/app/new.go:410 ./cli/app/ps.go:212 ./cli/app/restart.go:162 ./cli/app/restore.go:137 ./cli/app/secret.go:568 ./cli/app/secret.go:608 ./cli/app/secret.go:632 ./cli/app/secret.go:640 ./cli/catalogue/catalogue.go:317 ./cli/recipe/lint.go:136
msgid "chaos"
msgstr ""
@@ -2068,7 +2068,7 @@ msgstr ""
msgid "check <domain> [flags]"
msgstr ""
#: ./cli/app/deploy.go:95 ./cli/app/undeploy.go:58 ./cli/app/upgrade.go:443
#: ./cli/app/deploy.go:95 ./cli/app/undeploy.go:58 ./cli/app/upgrade.go:442
#, c-format
msgid "checking whether %s is already deployed"
msgstr ""
@@ -2371,7 +2371,7 @@ msgstr ""
msgid "critical errors present in %s config"
msgstr ""
#: ./cli/app/rollback.go:300
#: ./cli/app/rollback.go:299
#, c-format
msgid "current deployment '%s' is not a known version for %s"
msgstr ""
@@ -2422,7 +2422,7 @@ msgstr ""
msgid "deploy labels stanza present"
msgstr ""
#: ./cli/app/deploy.go:449
#: ./cli/app/deploy.go:448
msgid "deploy latest recipe version"
msgstr ""
@@ -2524,11 +2524,11 @@ msgstr ""
msgid "dirty: %v, "
msgstr ""
#: ./cli/app/deploy.go:441 ./cli/app/rollback.go:372 ./cli/app/upgrade.go:481
#: ./cli/app/deploy.go:440 ./cli/app/rollback.go:371 ./cli/app/upgrade.go:480
msgid "disable converge logic checks"
msgstr ""
#: ./cli/app/deploy.go:433 ./cli/app/rollback.go:364 ./cli/app/upgrade.go:473
#: ./cli/app/deploy.go:432 ./cli/app/rollback.go:363 ./cli/app/upgrade.go:472
msgid "disable public DNS checks"
msgstr ""
@@ -2737,7 +2737,7 @@ msgstr ""
#. translators: `abra recipe fetch` aliases. use a comma separated list of aliases
#. with no spaces in between
#: ./cli/app/deploy.go:423 ./cli/app/env.go:325 ./cli/app/remove.go:163 ./cli/app/rollback.go:354 ./cli/app/secret.go:593 ./cli/app/upgrade.go:463 ./cli/app/volume.go:217 ./cli/recipe/fetch.go:20 ./cli/recipe/fetch.go:138
#: ./cli/app/deploy.go:422 ./cli/app/env.go:325 ./cli/app/remove.go:163 ./cli/app/rollback.go:353 ./cli/app/secret.go:593 ./cli/app/upgrade.go:462 ./cli/app/volume.go:217 ./cli/recipe/fetch.go:20 ./cli/recipe/fetch.go:138
msgid "f"
msgstr ""
@@ -2988,7 +2988,7 @@ msgstr ""
msgid "final merged env values for %s are: %s"
msgstr ""
#: ./cli/app/deploy.go:422 ./cli/app/env.go:324 ./cli/app/remove.go:162 ./cli/app/rollback.go:353 ./cli/app/upgrade.go:462 ./cli/app/volume.go:216 ./cli/recipe/fetch.go:137
#: ./cli/app/deploy.go:421 ./cli/app/env.go:324 ./cli/app/remove.go:162 ./cli/app/rollback.go:352 ./cli/app/upgrade.go:461 ./cli/app/volume.go:216 ./cli/recipe/fetch.go:137
msgid "force"
msgstr ""
@@ -3202,7 +3202,7 @@ msgstr ""
msgid "id: %s, "
msgstr ""
#: ./cli/app/backup.go:321 ./cli/app/backup.go:337 ./cli/app/check.go:97 ./cli/app/cmd.go:287 ./cli/app/cp.go:387 ./cli/app/deploy.go:417 ./cli/app/labels.go:145 ./cli/app/list.go:337 ./cli/app/new.go:413 ./cli/app/ps.go:215 ./cli/app/restart.go:165 ./cli/app/restore.go:140 ./cli/app/secret.go:571 ./cli/app/secret.go:611 ./cli/app/secret.go:635 ./cli/app/secret.go:643 ./cli/catalogue/catalogue.go:320 ./cli/recipe/lint.go:139
#: ./cli/app/backup.go:321 ./cli/app/backup.go:337 ./cli/app/check.go:97 ./cli/app/cmd.go:287 ./cli/app/cp.go:387 ./cli/app/deploy.go:416 ./cli/app/labels.go:145 ./cli/app/list.go:337 ./cli/app/new.go:413 ./cli/app/ps.go:215 ./cli/app/restart.go:165 ./cli/app/restore.go:140 ./cli/app/secret.go:571 ./cli/app/secret.go:611 ./cli/app/secret.go:635 ./cli/app/secret.go:643 ./cli/catalogue/catalogue.go:320 ./cli/recipe/lint.go:139
msgid "ignore uncommitted recipes changes"
msgstr ""
@@ -3400,7 +3400,7 @@ msgstr ""
#. no spaces in between
#. translators: `abra recipe lint` aliases. use a comma separated list of
#. aliases with no spaces in between
#: ./cli/app/cmd.go:261 ./cli/app/deploy.go:447 ./cli/app/logs.go:20 ./cli/recipe/lint.go:17 ./cli/server/add.go:207
#: ./cli/app/cmd.go:261 ./cli/app/deploy.go:446 ./cli/app/logs.go:20 ./cli/recipe/lint.go:17 ./cli/server/add.go:207
msgid "l"
msgstr ""
@@ -3415,7 +3415,7 @@ msgstr ""
msgid "labels <domain> [flags]"
msgstr ""
#: ./cli/app/deploy.go:446 ./cli/app/list.go:186
#: ./cli/app/deploy.go:445 ./cli/app/list.go:186
msgid "latest"
msgstr ""
@@ -3779,7 +3779,7 @@ msgstr ""
msgid "no recipe name provided"
msgstr ""
#: ./cli/app/upgrade.go:242
#: ./cli/app/upgrade.go:241
#, c-format
msgid "no release notes for upgrading from %s to %s"
msgstr ""
@@ -3868,11 +3868,11 @@ msgstr ""
msgid "no volumes to remove"
msgstr ""
#: ./cli/app/deploy.go:438 ./cli/app/rollback.go:369 ./cli/app/upgrade.go:478
#: ./cli/app/deploy.go:437 ./cli/app/rollback.go:368 ./cli/app/upgrade.go:477
msgid "no-converge-checks"
msgstr ""
#: ./cli/app/deploy.go:430 ./cli/app/rollback.go:361 ./cli/app/upgrade.go:470
#: ./cli/app/deploy.go:429 ./cli/app/rollback.go:360 ./cli/app/upgrade.go:469
msgid "no-domain-checks"
msgstr ""
@@ -3940,7 +3940,7 @@ msgstr ""
msgid "only show errors"
msgstr ""
#: ./cli/app/upgrade.go:489
#: ./cli/app/upgrade.go:488
msgid "only show release notes"
msgstr ""
@@ -3971,22 +3971,22 @@ msgstr ""
msgid "parsed following command arguments: %s"
msgstr ""
#: ./cli/app/upgrade.go:346
#: ./cli/app/upgrade.go:345
#, c-format
msgid "parsing chosen upgrade version failed: %s"
msgstr ""
#: ./cli/app/upgrade.go:390
#: ./cli/app/upgrade.go:389
#, c-format
msgid "parsing deployed version failed: %s"
msgstr ""
#: ./cli/app/upgrade.go:351
#: ./cli/app/upgrade.go:350
#, c-format
msgid "parsing deployment version failed: %s"
msgstr ""
#: ./cli/app/upgrade.go:357 ./cli/app/upgrade.go:396
#: ./cli/app/upgrade.go:356 ./cli/app/upgrade.go:395
#, c-format
msgid "parsing recipe version failed: %s"
msgstr ""
@@ -4011,7 +4011,7 @@ msgstr ""
msgid "pattern"
msgstr ""
#: ./cli/app/deploy.go:425 ./cli/app/env.go:327 ./cli/app/remove.go:165 ./cli/app/rollback.go:356 ./cli/app/upgrade.go:465 ./cli/app/volume.go:219
#: ./cli/app/deploy.go:424 ./cli/app/env.go:327 ./cli/app/remove.go:165 ./cli/app/rollback.go:355 ./cli/app/upgrade.go:464 ./cli/app/volume.go:219
msgid "perform action without further prompt"
msgstr ""
@@ -4021,22 +4021,22 @@ msgstr ""
msgid "pl,p"
msgstr ""
#: ./cli/app/rollback.go:268
#: ./cli/app/rollback.go:267
#, c-format
msgid "please select a downgrade (version: %s):"
msgstr ""
#: ./cli/app/rollback.go:273
#: ./cli/app/rollback.go:272
#, c-format
msgid "please select a downgrade (version: %s, chaos: %s):"
msgstr ""
#: ./cli/app/upgrade.go:313
#: ./cli/app/upgrade.go:312
#, c-format
msgid "please select an upgrade (version: %s):"
msgstr ""
#: ./cli/app/upgrade.go:318
#: ./cli/app/upgrade.go:317
#, c-format
msgid "please select an upgrade (version: %s, chaos: %s):"
msgstr ""
@@ -4119,7 +4119,7 @@ msgstr ""
#. with no spaces in between
#. translators: `abra recipe` aliases. use a comma separated list of aliases
#. with no spaces in between
#: ./cli/app/backup.go:327 ./cli/app/list.go:304 ./cli/app/move.go:350 ./cli/app/run.go:23 ./cli/app/upgrade.go:487 ./cli/catalogue/catalogue.go:302 ./cli/recipe/recipe.go:12 ./cli/recipe/release.go:624
#: ./cli/app/backup.go:327 ./cli/app/list.go:304 ./cli/app/move.go:350 ./cli/app/run.go:23 ./cli/app/upgrade.go:486 ./cli/catalogue/catalogue.go:302 ./cli/recipe/recipe.go:12 ./cli/recipe/release.go:624
msgid "r"
msgstr ""
@@ -4239,7 +4239,7 @@ msgstr ""
msgid "release failed. any changes made have been reverted"
msgstr ""
#: ./cli/app/upgrade.go:486
#: ./cli/app/upgrade.go:485
msgid "releasenotes"
msgstr ""
@@ -4543,7 +4543,7 @@ msgstr ""
msgid "run command locally"
msgstr ""
#: ./cli/app/deploy.go:282 ./cli/app/upgrade.go:294
#: ./cli/app/deploy.go:281 ./cli/app/upgrade.go:293
#, c-format
msgid "run the following post-deploy commands: %s"
msgstr ""
@@ -4626,12 +4626,12 @@ msgstr ""
msgid "secret not found: %s"
msgstr ""
#: ./cli/app/deploy.go:359
#: ./cli/app/deploy.go:358
#, c-format
msgid "secret not generated: %s"
msgstr ""
#: ./cli/app/deploy.go:357
#: ./cli/app/deploy.go:356
#, c-format
msgid "secret not inserted (#generate=false): %s"
msgstr ""
@@ -4650,7 +4650,7 @@ msgstr ""
msgid "secrets are %s shown again, please save them %s"
msgstr ""
#: ./cli/app/deploy.go:307
#: ./cli/app/deploy.go:306
#, c-format
msgid "selected latest recipe version: %s (from %d available versions)"
msgstr ""
@@ -4775,7 +4775,7 @@ msgstr ""
msgid "severity"
msgstr ""
#: ./cli/app/deploy.go:457 ./cli/app/rollback.go:380 ./cli/app/upgrade.go:497
#: ./cli/app/deploy.go:456 ./cli/app/rollback.go:379 ./cli/app/upgrade.go:496
msgid "show all configs & images, including unchanged ones"
msgstr ""
@@ -4799,7 +4799,7 @@ msgstr ""
msgid "show debug messages"
msgstr ""
#: ./cli/app/deploy.go:454 ./cli/app/rollback.go:377 ./cli/app/upgrade.go:494
#: ./cli/app/deploy.go:453 ./cli/app/rollback.go:376 ./cli/app/upgrade.go:493
msgid "show-unchanged"
msgstr ""
@@ -4847,11 +4847,11 @@ msgstr ""
msgid "skipping converge logic checks"
msgstr ""
#: ./cli/app/deploy.go:209
#: ./cli/app/deploy.go:208
msgid "skipping domain checks"
msgstr ""
#: ./cli/app/deploy.go:206
#: ./cli/app/deploy.go:205
msgid "skipping domain checks, no DOMAIN=... configured"
msgstr ""
@@ -5653,27 +5653,27 @@ msgstr ""
msgid "version wiped from %s.env"
msgstr ""
#: ./cli/app/deploy.go:373
#: ./cli/app/deploy.go:372
#, c-format
msgid "version: taking chaos version: %s"
msgstr ""
#: ./cli/app/deploy.go:399
#: ./cli/app/deploy.go:398
#, c-format
msgid "version: taking deployed version: %s"
msgstr ""
#: ./cli/app/deploy.go:404
#: ./cli/app/deploy.go:403
#, c-format
msgid "version: taking new recipe version: %s"
msgstr ""
#: ./cli/app/deploy.go:393
#: ./cli/app/deploy.go:392
#, c-format
msgid "version: taking version from .env file: %s"
msgstr ""
#: ./cli/app/deploy.go:379
#: ./cli/app/deploy.go:378
#, c-format
msgid "version: taking version from cli arg: %s"
msgstr ""
@@ -5801,7 +5801,7 @@ msgstr ""
msgid "writer: %v, "
msgstr ""
#: ./cli/app/deploy.go:289 ./cli/app/new.go:255 ./cli/app/rollback.go:257 ./cli/app/undeploy.go:120 ./cli/app/upgrade.go:302
#: ./cli/app/deploy.go:288 ./cli/app/new.go:255 ./cli/app/rollback.go:256 ./cli/app/undeploy.go:120 ./cli/app/upgrade.go:301
#, c-format
msgid "writing recipe version failed: %s"
msgstr ""
+62 -62
View File
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL\n"
"POT-Creation-Date: 2026-06-14 17:56+0200\n"
"POT-Creation-Date: 2026-06-09 16:29+0200\n"
"PO-Revision-Date: 2026-02-28 13:52+0000\n"
"Last-Translator: chasqui <chasqui@cryptolab.net>\n"
"Language-Team: Spanish <https://translate.coopcloud.tech/projects/co-op-cloud/abra/es/>\n"
@@ -443,19 +443,19 @@ msgstr "¿%s no tiene un archivo compose.yml o compose.*.yml?"
msgid "%s is missing the TYPE env var?"
msgstr "¿A %s le falta la variable de entorno TYPE?"
#: cli/app/rollback.go:310 cli/app/rollback.go:314
#: cli/app/rollback.go:309 cli/app/rollback.go:313
#, c-format
msgid "%s is not a downgrade for %s?"
msgstr "¿%s no es un downgrade para %s?"
#: cli/app/upgrade.go:430 cli/app/upgrade.go:434
#: cli/app/upgrade.go:429 cli/app/upgrade.go:433
#, c-format
msgid "%s is not an upgrade for %s?"
msgstr "¿%s no es una actualización para %s?"
#: cli/app/env.go:146 cli/app/logs.go:65 cli/app/ps.go:62
#: cli/app/restart.go:100 cli/app/services.go:55 cli/app/undeploy.go:66
#: cli/app/upgrade.go:451
#: cli/app/upgrade.go:450
#, c-format
msgid "%s is not deployed?"
msgstr "¿%s no está desplegado?"
@@ -475,7 +475,7 @@ msgstr "%s todavía está desplegado. Ejecuta \"abra aplicacion plegar %s\""
msgid "%s missing context, run \"abra server add %s\"?"
msgstr "falta contexto %s, ¿ejecutar \"abra servidor agregar %s\"?"
#: cli/app/deploy.go:195 cli/app/upgrade.go:211
#: cli/app/deploy.go:194 cli/app/upgrade.go:210
#, c-format
msgid "%s missing from %s.env"
msgstr "falta %s de %s.env"
@@ -655,12 +655,12 @@ msgstr "%s: no se puede resolver la dirección IPv4: %s"
msgid "%s: waiting %d seconds before next retry"
msgstr "%s: esperando %d segundos antes del siguiente reintento"
#: cli/app/upgrade.go:425
#: cli/app/upgrade.go:424
#, c-format
msgid "'%s' is not a known version"
msgstr "'%s' no es una versión conocida"
#: cli/app/rollback.go:305 cli/app/upgrade.go:420
#: cli/app/rollback.go:304 cli/app/upgrade.go:419
#, c-format
msgid "'%s' is not a known version for %s"
msgstr "'%s' no es una versión conocida para %s"
@@ -759,7 +759,7 @@ msgid "Both local recipe and live deployment labels are shown."
msgstr "Se muestran tanto la receta local como las etiquetas del despliegue en vivo."
#: cli/app/backup.go:319 cli/app/backup.go:335 cli/app/check.go:95
#: cli/app/cmd.go:285 cli/app/cp.go:385 cli/app/deploy.go:415
#: cli/app/cmd.go:285 cli/app/cp.go:385 cli/app/deploy.go:414
#: cli/app/labels.go:143 cli/app/list.go:335 cli/app/new.go:411
#: cli/app/ps.go:213 cli/app/restart.go:163 cli/app/restore.go:138
#: cli/app/secret.go:569 cli/app/secret.go:609 cli/app/secret.go:633
@@ -959,8 +959,8 @@ msgstr ""
"en un almacén pass (ver passwordstore.org). El comando pass debe estar \n"
"disponible en tu $PATH."
#: cli/app/deploy.go:431 cli/app/new.go:387 cli/app/rollback.go:362
#: cli/app/upgrade.go:471
#: cli/app/deploy.go:430 cli/app/new.go:387 cli/app/rollback.go:361
#: cli/app/upgrade.go:470
msgid "D"
msgstr ""
@@ -1881,7 +1881,7 @@ msgstr ""
" PS> abra autocomplete powershell > abra.ps1\n"
" # y fuente (source) ese archivo desde tu perfil de PowerShell."
#: cli/app/deploy.go:455 cli/app/rollback.go:378 cli/app/upgrade.go:495
#: cli/app/deploy.go:454 cli/app/rollback.go:377 cli/app/upgrade.go:494
msgid "U"
msgstr ""
@@ -2368,7 +2368,7 @@ msgstr "Intentando generar y almacenar %s en %s"
msgid "attempting to run %s"
msgstr "Intentando ejecutar %s"
#: cli/app/deploy.go:284 cli/app/upgrade.go:297
#: cli/app/deploy.go:283 cli/app/upgrade.go:296
#, c-format
msgid "attempting to run post deploy commands, saw: %s"
msgstr "Intentando ejecutar los comandos posteriores al despliegue: %s"
@@ -2454,8 +2454,8 @@ msgstr "enlace symlink roto en tus carpetas de configuración de abra: %s"
#. no spaces in between
#. translators: `abra app cp` aliases. use a comma separated list of aliases with
#. no spaces in between
#: cli/app/backup.go:148 cli/app/cp.go:30 cli/app/deploy.go:439
#: cli/app/rollback.go:370 cli/app/upgrade.go:479
#: cli/app/backup.go:148 cli/app/cp.go:30 cli/app/deploy.go:438
#: cli/app/rollback.go:369 cli/app/upgrade.go:478
msgid "c"
msgstr ""
@@ -2511,7 +2511,7 @@ msgstr "no se puede obtener la etiqueta %s para %s"
msgid "cannot redeploy previous chaos version (%s), did you mean to use \"--chaos\"?"
msgstr "no se puede redeplegar la versión anterior de caos (%s), ¿Era tu intención usar \"--caos\"?"
#: cli/app/deploy.go:389
#: cli/app/deploy.go:388
#, c-format
msgid ""
"cannot redeploy previous chaos version (%s), did you mean to use \"--chaos\"?\n"
@@ -2533,7 +2533,7 @@ msgstr "no se puede especificar una etiqueta y un tipo de incremento al mismo ti
msgid "cannot use '[secret] [version]' and '--all' together"
msgstr "no se puede usar '[secreto] [versión]' y '--todos' juntos"
#: cli/app/deploy.go:331
#: cli/app/deploy.go:330
msgid "cannot use --chaos and --latest together"
msgstr "no se puede usar --caos y --latest juntos"
@@ -2557,11 +2557,11 @@ msgstr "no se puede usar [server] y --local al mismo tiempo"
msgid "cannot use [service] and --all-services/-a together"
msgstr "no se puede usar [servicio] y --todos-los-servicios/-a juntos"
#: cli/app/deploy.go:323 cli/app/new.go:80
#: cli/app/deploy.go:322 cli/app/new.go:80
msgid "cannot use [version] and --chaos together"
msgstr "no se puede usar [versión] y --caos juntos"
#: cli/app/deploy.go:327
#: cli/app/deploy.go:326
msgid "cannot use [version] and --latest together"
msgstr "no se puede usar [versión] y --latest juntos"
@@ -2598,7 +2598,7 @@ msgid "cfg"
msgstr ""
#: cli/app/backup.go:318 cli/app/backup.go:334 cli/app/check.go:94
#: cli/app/cmd.go:284 cli/app/cp.go:384 cli/app/deploy.go:414
#: cli/app/cmd.go:284 cli/app/cp.go:384 cli/app/deploy.go:413
#: cli/app/labels.go:142 cli/app/list.go:334 cli/app/new.go:410
#: cli/app/ps.go:212 cli/app/restart.go:162 cli/app/restore.go:137
#: cli/app/secret.go:568 cli/app/secret.go:608 cli/app/secret.go:632
@@ -2616,7 +2616,7 @@ msgstr ""
msgid "check <domain> [flags]"
msgstr "verificar <aplicacion> [opciones]"
#: cli/app/deploy.go:95 cli/app/undeploy.go:58 cli/app/upgrade.go:443
#: cli/app/deploy.go:95 cli/app/undeploy.go:58 cli/app/upgrade.go:442
#, c-format
msgid "checking whether %s is already deployed"
msgstr "verificando si %s ya está desplegado"
@@ -2919,7 +2919,7 @@ msgstr "crítico"
msgid "critical errors present in %s config"
msgstr "errores críticos presentes en la configuración de %s"
#: cli/app/rollback.go:300
#: cli/app/rollback.go:299
#, c-format
msgid "current deployment '%s' is not a known version for %s"
msgstr "el despliegue actual '%s' no es una versión conocida para %s"
@@ -2971,7 +2971,7 @@ msgstr "despliegue en proceso 🟠"
msgid "deploy labels stanza present"
msgstr "stanza de etiquetas de despliegue presente"
#: cli/app/deploy.go:449
#: cli/app/deploy.go:448
msgid "deploy latest recipe version"
msgstr "desplegar la última versión de la receta"
@@ -3073,11 +3073,11 @@ msgstr "el directorio está vacío: %s"
msgid "dirty: %v, "
msgstr ""
#: cli/app/deploy.go:441 cli/app/rollback.go:372 cli/app/upgrade.go:481
#: cli/app/deploy.go:440 cli/app/rollback.go:371 cli/app/upgrade.go:480
msgid "disable converge logic checks"
msgstr "desactivar comprobaciones de lógica de convergencia"
#: cli/app/deploy.go:433 cli/app/rollback.go:364 cli/app/upgrade.go:473
#: cli/app/deploy.go:432 cli/app/rollback.go:363 cli/app/upgrade.go:472
msgid "disable public DNS checks"
msgstr "desactivar comprobaciones de DNS público"
@@ -3288,8 +3288,8 @@ msgstr "extrayendo secreto %s en %s"
#. translators: `abra recipe fetch` aliases. use a comma separated list of aliases
#. with no spaces in between
#: cli/app/deploy.go:423 cli/app/env.go:325 cli/app/remove.go:163
#: cli/app/rollback.go:354 cli/app/secret.go:593 cli/app/upgrade.go:463
#: cli/app/deploy.go:422 cli/app/env.go:325 cli/app/remove.go:163
#: cli/app/rollback.go:353 cli/app/secret.go:593 cli/app/upgrade.go:462
#: cli/app/volume.go:217 cli/recipe/fetch.go:20 cli/recipe/fetch.go:138
msgid "f"
msgstr ""
@@ -3541,8 +3541,8 @@ msgstr "Filtrar por receta"
msgid "final merged env values for %s are: %s"
msgstr "Los valores finales combinados de entorno para %s son: %s"
#: cli/app/deploy.go:422 cli/app/env.go:324 cli/app/remove.go:162
#: cli/app/rollback.go:353 cli/app/upgrade.go:462 cli/app/volume.go:216
#: cli/app/deploy.go:421 cli/app/env.go:324 cli/app/remove.go:162
#: cli/app/rollback.go:352 cli/app/upgrade.go:461 cli/app/volume.go:216
#: cli/recipe/fetch.go:137
msgid "force"
msgstr "forzar"
@@ -3758,7 +3758,7 @@ msgid "id: %s, "
msgstr ""
#: cli/app/backup.go:321 cli/app/backup.go:337 cli/app/check.go:97
#: cli/app/cmd.go:287 cli/app/cp.go:387 cli/app/deploy.go:417
#: cli/app/cmd.go:287 cli/app/cp.go:387 cli/app/deploy.go:416
#: cli/app/labels.go:145 cli/app/list.go:337 cli/app/new.go:413
#: cli/app/ps.go:215 cli/app/restart.go:165 cli/app/restore.go:140
#: cli/app/secret.go:571 cli/app/secret.go:611 cli/app/secret.go:635
@@ -3960,7 +3960,7 @@ msgstr "versión %s especificada inválida"
#. no spaces in between
#. translators: `abra recipe lint` aliases. use a comma separated list of
#. aliases with no spaces in between
#: cli/app/cmd.go:261 cli/app/deploy.go:447 cli/app/logs.go:20
#: cli/app/cmd.go:261 cli/app/deploy.go:446 cli/app/logs.go:20
#: cli/recipe/lint.go:17 cli/server/add.go:207
msgid "l"
msgstr ""
@@ -3976,7 +3976,7 @@ msgstr ""
msgid "labels <domain> [flags]"
msgstr "etiquetas <aplicacion> [opciones]"
#: cli/app/deploy.go:446 cli/app/list.go:186
#: cli/app/deploy.go:445 cli/app/list.go:186
msgid "latest"
msgstr "ultima"
@@ -4352,7 +4352,7 @@ msgstr "¿no existe la receta '%s'?"
msgid "no recipe name provided"
msgstr "no se proporcionó el nombre de la receta"
#: cli/app/upgrade.go:242
#: cli/app/upgrade.go:241
#, fuzzy, c-format
msgid "no release notes for upgrading from %s to %s"
msgstr "ejecución de prueba: mover la nota de la versión de 'next' a %s"
@@ -4441,11 +4441,11 @@ msgstr "no se eliminaron volúmenes"
msgid "no volumes to remove"
msgstr "no hay volúmenes para eliminar"
#: cli/app/deploy.go:438 cli/app/rollback.go:369 cli/app/upgrade.go:478
#: cli/app/deploy.go:437 cli/app/rollback.go:368 cli/app/upgrade.go:477
msgid "no-converge-checks"
msgstr "sin-verificaciones-de-convergencia"
#: cli/app/deploy.go:430 cli/app/rollback.go:361 cli/app/upgrade.go:470
#: cli/app/deploy.go:429 cli/app/rollback.go:360 cli/app/upgrade.go:469
msgid "no-domain-checks"
msgstr "sin-verificaciones-de-dominio"
@@ -4513,7 +4513,7 @@ msgstr "solo se usaron etiquetas anotadas para la versión de la receta"
msgid "only show errors"
msgstr "mostrar solo errores"
#: cli/app/upgrade.go:489
#: cli/app/upgrade.go:488
msgid "only show release notes"
msgstr "solo mostrar notas de la versión"
@@ -4547,22 +4547,22 @@ msgstr "parseado %s de %s"
msgid "parsed following command arguments: %s"
msgstr "parseados los siguientes argumentos del comando: %s"
#: cli/app/upgrade.go:346
#: cli/app/upgrade.go:345
#, c-format
msgid "parsing chosen upgrade version failed: %s"
msgstr "falló la actualización de versión elegida para el parsing: %s"
#: cli/app/upgrade.go:390
#: cli/app/upgrade.go:389
#, c-format
msgid "parsing deployed version failed: %s"
msgstr "parsing fallido de la versión desplegada: %s"
#: cli/app/upgrade.go:351
#: cli/app/upgrade.go:350
#, c-format
msgid "parsing deployment version failed: %s"
msgstr "parsing fallido de la versión de despliegue: %s"
#: cli/app/upgrade.go:357 cli/app/upgrade.go:396
#: cli/app/upgrade.go:356 cli/app/upgrade.go:395
#, c-format
msgid "parsing recipe version failed: %s"
msgstr "parsing fallido de la versión de la receta: %s"
@@ -4590,8 +4590,8 @@ msgstr "ruta"
msgid "pattern"
msgstr "patrón"
#: cli/app/deploy.go:425 cli/app/env.go:327 cli/app/remove.go:165
#: cli/app/rollback.go:356 cli/app/upgrade.go:465 cli/app/volume.go:219
#: cli/app/deploy.go:424 cli/app/env.go:327 cli/app/remove.go:165
#: cli/app/rollback.go:355 cli/app/upgrade.go:464 cli/app/volume.go:219
msgid "perform action without further prompt"
msgstr "realizar acción sin más avisos"
@@ -4601,22 +4601,22 @@ msgstr "realizar acción sin más avisos"
msgid "pl,p"
msgstr ""
#: cli/app/rollback.go:268
#: cli/app/rollback.go:267
#, c-format
msgid "please select a downgrade (version: %s):"
msgstr "por favor, selecciona una versión anterior (downgrade) (versión: %s):"
#: cli/app/rollback.go:273
#: cli/app/rollback.go:272
#, c-format
msgid "please select a downgrade (version: %s, chaos: %s):"
msgstr "por favor, selecciona una versión anterior (downgrade) (versión: %s, caos: %s):"
#: cli/app/upgrade.go:313
#: cli/app/upgrade.go:312
#, c-format
msgid "please select an upgrade (version: %s):"
msgstr "por favor, selecciona una actualización (versión: %s):"
#: cli/app/upgrade.go:318
#: cli/app/upgrade.go:317
#, c-format
msgid "please select an upgrade (version: %s, chaos: %s):"
msgstr "por favor, selecciona una actualización (versión: %s, caos: %s):"
@@ -4702,7 +4702,7 @@ msgstr "consultando servidores remotos..."
#. translators: `abra recipe` aliases. use a comma separated list of aliases
#. with no spaces in between
#: cli/app/backup.go:327 cli/app/list.go:304 cli/app/move.go:350
#: cli/app/run.go:23 cli/app/upgrade.go:487 cli/catalogue/catalogue.go:302
#: cli/app/run.go:23 cli/app/upgrade.go:486 cli/catalogue/catalogue.go:302
#: cli/recipe/recipe.go:12 cli/recipe/release.go:624
msgid "r"
msgstr ""
@@ -4827,7 +4827,7 @@ msgstr "publicar <receta> [version] [opciones]"
msgid "release failed. any changes made have been reverted"
msgstr ""
#: cli/app/upgrade.go:486
#: cli/app/upgrade.go:485
msgid "releasenotes"
msgstr "notas de la versión"
@@ -5132,7 +5132,7 @@ msgstr "ejecutar comando como usuario"
msgid "run command locally"
msgstr "ejecutar comando localmente"
#: cli/app/deploy.go:282 cli/app/upgrade.go:294
#: cli/app/deploy.go:281 cli/app/upgrade.go:293
#, c-format
msgid "run the following post-deploy commands: %s"
msgstr "Ejecutar los siguientes comandos después del despliegue: %s"
@@ -5219,12 +5219,12 @@ msgstr "datos del secreto no proporcionados en la línea de comandos o stdin, so
msgid "secret not found: %s"
msgstr "secreto no encontrado: %s"
#: cli/app/deploy.go:359
#: cli/app/deploy.go:358
#, c-format
msgid "secret not generated: %s"
msgstr "secreto no generado: %s"
#: cli/app/deploy.go:357
#: cli/app/deploy.go:356
#, c-format
msgid "secret not inserted (#generate=false): %s"
msgstr "secreto no insertado (#generate=false): %s"
@@ -5243,7 +5243,7 @@ msgstr "secretos"
msgid "secrets are %s shown again, please save them %s"
msgstr "los secretos se muestran %s nuevamente, por favor guárdalos %s"
#: cli/app/deploy.go:307
#: cli/app/deploy.go:306
#, c-format
msgid "selected latest recipe version: %s (from %d available versions)"
msgstr "versión de receta más reciente seleccionada: %s (de %d versiones disponibles)"
@@ -5369,7 +5369,7 @@ msgstr "establecer referencia: %s"
msgid "severity"
msgstr "gravedad"
#: cli/app/deploy.go:457 cli/app/rollback.go:380 cli/app/upgrade.go:497
#: cli/app/deploy.go:456 cli/app/rollback.go:379 cli/app/upgrade.go:496
msgid "show all configs & images, including unchanged ones"
msgstr "mostrar todas las configuraciones e imágenes, incluidas las no cambiadas"
@@ -5393,7 +5393,7 @@ msgstr "mostrar aplicaciones de un servidor específico"
msgid "show debug messages"
msgstr "mostrar mensajes para el debugeo"
#: cli/app/deploy.go:454 cli/app/rollback.go:377 cli/app/upgrade.go:494
#: cli/app/deploy.go:453 cli/app/rollback.go:376 cli/app/upgrade.go:493
msgid "show-unchanged"
msgstr "mostrar-sin-cambios"
@@ -5441,11 +5441,11 @@ msgstr "omitiendo según lo solicitado, plegado aún está en progreso 🟠"
msgid "skipping converge logic checks"
msgstr "omitiendo comprobaciones de lógica de convergencia"
#: cli/app/deploy.go:209
#: cli/app/deploy.go:208
msgid "skipping domain checks"
msgstr "omitiendo comprobaciones de dominio"
#: cli/app/deploy.go:206
#: cli/app/deploy.go:205
msgid "skipping domain checks, no DOMAIN=... configured"
msgstr "omitiendo comprobaciones de dominio, no DOMAIN=... configurado"
@@ -6255,27 +6255,27 @@ msgstr "la versión parece inválida: %s"
msgid "version wiped from %s.env"
msgstr "versión eliminada de %s.env"
#: cli/app/deploy.go:373
#: cli/app/deploy.go:372
#, c-format
msgid "version: taking chaos version: %s"
msgstr "versión: tomando la versión de caos: %s"
#: cli/app/deploy.go:399
#: cli/app/deploy.go:398
#, c-format
msgid "version: taking deployed version: %s"
msgstr "versión: tomando la versión desplegada: %s"
#: cli/app/deploy.go:404
#: cli/app/deploy.go:403
#, c-format
msgid "version: taking new recipe version: %s"
msgstr "versión: tomando la nueva versión de la receta: %s"
#: cli/app/deploy.go:393
#: cli/app/deploy.go:392
#, c-format
msgid "version: taking version from .env file: %s"
msgstr "versión: tomando la versión desde el archivo .env: %s"
#: cli/app/deploy.go:379
#: cli/app/deploy.go:378
#, c-format
msgid "version: taking version from cli arg: %s"
msgstr "versión: tomando la versión desde el argumento de la línea de comandos: %s"
@@ -6406,8 +6406,8 @@ msgstr "el directorio de trabajo no está limpio en %s, abortando"
msgid "writer: %v, "
msgstr ""
#: cli/app/deploy.go:289 cli/app/new.go:255 cli/app/rollback.go:257
#: cli/app/undeploy.go:120 cli/app/upgrade.go:302
#: cli/app/deploy.go:288 cli/app/new.go:255 cli/app/rollback.go:256
#: cli/app/undeploy.go:120 cli/app/upgrade.go:301
#, c-format
msgid "writing recipe version failed: %s"
msgstr "escritura de la versión de la receta fallida: %s"
+1 -1
View File
@@ -3,7 +3,7 @@ version: "3.8"
services:
app:
image: nginx:1.31.2
image: nginx:1.31.1
secrets:
- test_pass_one
- test_pass_two
-30
View File
@@ -1,30 +0,0 @@
#!/usr/bin/env bash
# This file generates local DNS aliases for the client VM for integration testing
echo "generating hosts file..."
hosts_file_path="./tests/resources/extra_hosts"
echo "removing old file..."
rm -f $hosts_file_path
# the server domain
server_ip="10.0.0.3"
domain="abra.local"
echo "$server_ip $domain" >> $hosts_file_path
# static subdomains used in integration tests
subdomains=("gitea" "zammad" "custom-html" "foo" "foobar")
for subdomain in "${subdomains[@]}"
do
echo "$server_ip $subdomain.$domain" >> $hosts_file_path
done
search_dir=./tests/integration
for entry in "$search_dir"/*.bats
do
file_name=$(basename "${entry}")
# converting file names to testing subdomains
subdomain=$(echo "$file_name" | tr . _)
echo "$server_ip $subdomain.$domain" >> $hosts_file_path
done
echo "writing extra hosts success"
+1 -2
View File
@@ -7,5 +7,4 @@
* Integration tests are in `./tests/integration`. Please see [these
docs](https://docs.coopcloud.tech/abra/hack/#integration-tests) for
instructions and tips on how to run them. If you want to run it locally via nix,
read the [nix testing docs](../nix/hosts/README.md).
instructions and tips on how to run them.
+5 -9
View File
@@ -598,7 +598,8 @@ teardown(){
run $ABRA app deploy "$TEST_APP_DOMAIN" --no-input
assert_success
_inspect_env_test_app
run docker inspect --format='{{range .Config.Env}}{{println .}}{{end}}' \
$(docker ps -f name="$TEST_APP_DOMAIN_$TEST_SERVER" -q)
assert_success
assert_output --partial "WITH_COMMENT=foo"
@@ -609,7 +610,8 @@ teardown(){
run $ABRA app deploy "$TEST_APP_DOMAIN" --no-input --force
assert_success
_inspect_env_test_app
run docker inspect --format='{{range .Config.Env}}{{println .}}{{end}}' \
$(docker ps -f name="$TEST_APP_DOMAIN_$TEST_SERVER" -q)
assert_success
refute_output --partial "WITH_COMMENT=foo"
assert_output --partial "WITH_COMMENT=bar"
@@ -627,14 +629,8 @@ teardown(){
run $ABRA app deploy "$TEST_APP_DOMAIN" --no-input
assert_success
if _is_local;
then
run docker service inspect --format "{{ range .Endpoint.Ports }}{{ .Protocol }}={{ .PublishedPort }}{{ end }}" \
run docker service inspect --format '{{ range .Endpoint.Ports }}{{ .Protocol }}={{ .PublishedPort }}{{ end }}' \
"${TEST_APP_DOMAIN//./_}_app"
else
run ssh "$TEST_SERVER" "docker service inspect --format '{{ range .Endpoint.Ports }}{{ .Protocol }}={{ .PublishedPort }}{{ end }}' ${TEST_APP_DOMAIN//./_}_app"
fi
assert_success
assert_output --partial "tcp=1312"
assert_output --partial "udp=1312"
@@ -133,7 +133,8 @@ teardown(){
run $ABRA app deploy "$TEST_APP_DOMAIN" "0.1.0+1.20.0" --no-input
assert_success
_inspect_env_test_app
run docker inspect --format='{{range .Config.Env}}{{println .}}{{end}}' \
$(docker ps -f name="$TEST_APP_DOMAIN_$TEST_SERVER" -q)
assert_success
assert_output --partial "$TEST_RECIIPE:0.1.0+1.20.0"
}
+4 -11
View File
@@ -140,22 +140,15 @@ teardown(){
_undeploy_app
sanitisedDomainName="${TEST_APP_DOMAIN//./_}"
remote_ssh_command=""
if _is_local;
then
run docker config create "${sanitisedDomainName}_test_conf_v99" "$ABRA_DIR/recipes/abra-test-recipe/abra.sh"
else
remote_ssh_command="ssh '$TEST_SERVER'"
run cat "$ABRA_DIR/recipes/abra-test-recipe/abra.sh" | ssh "$TEST_SERVER" docker config create "${sanitisedDomainName}_test_conf_v99 -"
assert_success
fi
run docker config create "${sanitisedDomainName}_test_conf_v99" "$ABRA_DIR/recipes/abra-test-recipe/abra.sh"
assert_success
assert bash -c "$remote_ssh_command docker config ls | grep -q test_conf_v99"
assert bash -c "docker config ls | grep -q test_conf_v99"
run $ABRA app rm "$TEST_APP_DOMAIN" --no-input
assert_success
refute bash -c "$remote_ssh_command docker config ls | grep -q test_conf_v99"
refute bash -c "docker config ls | grep -q test_conf_v99"
}
@test "remove .env file" {
@@ -54,7 +54,8 @@ teardown(){
--no-input
assert_success
_inspect_env_test_app
run docker inspect --format='{{range .Config.Env}}{{println .}}{{end}}' \
$(docker ps -f name="$TEST_APP_DOMAIN_$TEST_SERVER" -q)
assert_success
assert_output --partial "$TEST_RECIIPE:0.1.0+1.20.0"
}
@@ -53,7 +53,8 @@ teardown(){
run $ABRA app upgrade "$TEST_APP_DOMAIN" "0.2.0+1.21.0" --no-input
assert_success
_inspect_env_test_app
run docker inspect --format='{{range .Config.Env}}{{println .}}{{end}}' \
$(docker ps -f name="$TEST_APP_DOMAIN_$TEST_SERVER" -q)
assert_success
assert_output --partial "$TEST_RECIPE:0.2.0+1.21.0"
assert_output --partial "$TEST_RECIIPE:0.2.0+1.21.0"
}
+2 -11
View File
@@ -31,18 +31,9 @@ _ensure_ssh_agent() {
exit 1
fi
if [[ ! -v SSH_AUTH_SOCK ]]; then
export SSH_AUTH_SOCK="$HOME/.ssh/ssh_auth_sock"
export SSH_AUTH_SOCK="$HOME/.ssh/ssh_auth_sock"
if [ ! -S ~/.ssh/ssh_auth_sock ]; then
eval `ssh-agent`
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock
fi
}
_is_local() {
if [[ "$TEST_SERVER" == "default" ]];
then
return 0
else
return 1
fi
}
+6 -30
View File
@@ -1,37 +1,13 @@
#!/usr/bin/env bash
_ensure_swarm() {
if [ "$(docker info | grep Swarm | sed 's/Swarm: //g' | tr -d ' ')" == "inactive" ]; then
run docker swarm init --advertise-addr 127.0.0.1:2377
assert_success
if [ "$(docker info | grep Swarm | sed 's/Swarm: //g' | tr -d ' ')" == "inactive" ]; then
run docker swarm init --advertise-addr 127.0.0.1:2377
assert_success
fi
if ! docker network ls | grep -q 'proxy'; then
run docker network create -d overlay proxy
assert_success
if ! $(docker network ls | grep -q 'proxy'); then
run docker network create -d overlay proxy
assert_success
fi
if ! _is_local;
then
if [ "$(ssh "$TEST_SERVER" docker info | grep Swarm | sed 's/Swarm: //g' | tr -d ' ')" == "inactive" ]; then
run ssh "$TEST_SERVER" docker swarm init --advertise-addr 127.0.0.1:2377
assert_success
fi
if ! ssh "$TEST_SERVER" docker network ls | grep -q 'proxy'; then
run ssh "$TEST_SERVER" docker network create -d overlay proxy
assert_success
fi
fi
}
_inspect_env_test_app() {
if _is_local;
then
containerId="$(docker ps -f name="$TEST_APP_DOMAIN_$TEST_SERVER" -q)"
run docker inspect --format='{{range .Config.Env}}{{println .}}{{end}}' "$containerId"
else
containerId="$(ssh "$TEST_SERVER" docker ps -f name="$TEST_APP_DOMAIN" -q)"
run ssh "$TEST_SERVER" "docker inspect --format='{{range .Config.Env}}{{println .}}{{end}}' '$containerId'"
fi
}
+2
View File
@@ -38,6 +38,8 @@ teardown(){
run $ABRA recipe upgrade "custom-html" --no-input
assert_success
assert_output --partial 'can upgrade service: app'
assert_exists "$ABRA_DIR/recipes/custom-html"
}
+3 -3
View File
@@ -27,7 +27,7 @@ teardown(){
assert bash -c "docker context ls | grep -q $TEST_SERVER"
server_dir_perms=$(stat -c "%a" "$ABRA_DIR/servers/$TEST_SERVER")
assert_equal "$server_dir_perms" "700"
assert_equal $server_dir_perms "700"
}
@test "error if using name and --local together" {
@@ -43,8 +43,8 @@ teardown(){
assert bash -c "docker context ls | grep -q default"
assert_output --partial 'local server successfully added'
server_dir_perms=$(stat -c "%a" "$ABRA_DIR/servers/default")
assert_equal "$server_dir_perms" "700"
server_dir_perms=$(stat -c "%a" "$ABRA_DIR/servers/$TEST_SERVER")
assert_equal $server_dir_perms "700"
}
@test "create local server fails when no docker swarm" {
-57
View File
@@ -1,57 +0,0 @@
10.0.0.3 abra.local
10.0.0.3 gitea.abra.local
10.0.0.3 zammad.abra.local
10.0.0.3 custom-html.abra.local
10.0.0.3 foo.abra.local
10.0.0.3 foobar.abra.local
10.0.0.3 app_check_bats.abra.local
10.0.0.3 app_cmd_bats.abra.local
10.0.0.3 app_config_bats.abra.local
10.0.0.3 app_cp_bats.abra.local
10.0.0.3 app_deploy_bats.abra.local
10.0.0.3 app_deploy_env_version_bats.abra.local
10.0.0.3 app_deploy_overview_bats.abra.local
10.0.0.3 app_deploy_remote_recipes_bats.abra.local
10.0.0.3 app_env_bats.abra.local
10.0.0.3 app_env_version_bats.abra.local
10.0.0.3 app_labels_bats.abra.local
10.0.0.3 app_list_bats.abra.local
10.0.0.3 app_logs_bats.abra.local
10.0.0.3 app_move_bats.abra.local
10.0.0.3 app_new_bats.abra.local
10.0.0.3 app_ps_bats.abra.local
10.0.0.3 app_remove_bats.abra.local
10.0.0.3 app_restart_bats.abra.local
10.0.0.3 app_rollback_bats.abra.local
10.0.0.3 app_rollback_env_version_bats.abra.local
10.0.0.3 app_rollback_overview_bats.abra.local
10.0.0.3 app_run_bats.abra.local
10.0.0.3 app_secret_bats.abra.local
10.0.0.3 app_secret_env_version_bats.abra.local
10.0.0.3 app_services_bats.abra.local
10.0.0.3 app_undeploy_bats.abra.local
10.0.0.3 app_undeploy_env_version_bats.abra.local
10.0.0.3 app_undeploy_overview_bats.abra.local
10.0.0.3 app_upgrade_bats.abra.local
10.0.0.3 app_upgrade_env_version_bats.abra.local
10.0.0.3 app_upgrade_overview_bats.abra.local
10.0.0.3 app_volume_bats.abra.local
10.0.0.3 autocomplete_bats.abra.local
10.0.0.3 catalogue_bats.abra.local
10.0.0.3 dirs_bats.abra.local
10.0.0.3 install_bats.abra.local
10.0.0.3 recipe_diff_bats.abra.local
10.0.0.3 recipe_fetch_bats.abra.local
10.0.0.3 recipe_lint_bats.abra.local
10.0.0.3 recipe_list_bats.abra.local
10.0.0.3 recipe_new_bats.abra.local
10.0.0.3 recipe_release_bats.abra.local
10.0.0.3 recipe_reset_bats.abra.local
10.0.0.3 recipe_upgrade_bats.abra.local
10.0.0.3 recipe_version_bats.abra.local
10.0.0.3 server_add_bats.abra.local
10.0.0.3 server_list_bats.abra.local
10.0.0.3 server_prune_bats.abra.local
10.0.0.3 server_remove_bats.abra.local
10.0.0.3 upgrade_bats.abra.local
10.0.0.3 version_bats.abra.local
-7
View File
@@ -1,7 +0,0 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACBQ967UhxmFkq71WXvVRkEmtehCGsEnBVppAXxgtHHm7wAAAJhFGwTnRRsE
5wAAAAtzc2gtZWQyNTUxOQAAACBQ967UhxmFkq71WXvVRkEmtehCGsEnBVppAXxgtHHm7w
AAAEAnHEZcf2NeRQEcJC/aVgUWsdOz+vQgEG9ZY+3ErCeaKFD3rtSHGYWSrvVZe9VGQSa1
6EIawScFWmkBfGC0cebvAAAAFWFicmEgaW50ZWdyYXRpb24gdGVzdA==
-----END OPENSSH PRIVATE KEY-----
@@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFD3rtSHGYWSrvVZe9VGQSa16EIawScFWmkBfGC0cebv abra integration test
-1
View File
@@ -1 +0,0 @@
/path/to/this/repo
+1 -1
View File
@@ -3,7 +3,7 @@ version: "3.8"
services:
app:
image: nginx:1.31.2
image: nginx:1.31.1
networks:
- proxy
deploy:
+1 -1
View File
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1
ARG GO_VERSION=1.20.8
ARG ALPINE_VERSION=3.18
ARG ALPINE_VERSION=3.24
ARG XX_VERSION=1.2.1
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
+2 -2
View File
@@ -1,5 +1,5 @@
//go:build (appengine || js || nacl || tinygo || wasm || wasip1 || wasip2) && !windows
// +build appengine js nacl tinygo wasm wasip1 wasip2
//go:build (appengine || js || nacl || tinygo || wasm) && !windows
// +build appengine js nacl tinygo wasm
// +build !windows
package isatty
+2 -13
View File
@@ -31,10 +31,6 @@ func init() {
if procGetFileInformationByHandleEx.Find() != nil {
procGetFileInformationByHandleEx = nil
}
// Check if NtQueryObject is available.
if procNtQueryObject.Find() != nil {
procNtQueryObject = nil
}
}
// IsTerminal return true if the file descriptor is terminal.
@@ -47,7 +43,6 @@ func IsTerminal(fd uintptr) bool {
// Check pipe name is used for cygwin/msys2 pty.
// Cygwin/MSYS2 PTY has a name like:
// \{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master
// On Windows 7 a trailing suffix (e.g. "-nat") may be appended.
func isCygwinPipeName(name string) bool {
token := strings.Split(name, "-")
if len(token) < 5 {
@@ -77,19 +72,13 @@ func isCygwinPipeName(name string) bool {
return false
}
for _, t := range token[5:] {
if t == "" {
return false
}
}
return true
}
// getFileNameByHandle use the undocumented ntdll NtQueryObject to get file full name from file handler
// getFileNameByHandle use the undocomented ntdll NtQueryObject to get file full name from file handler
// since GetFileInformationByHandleEx is not available under windows Vista and still some old fashion
// guys are using Windows XP, this is a workaround for those guys, it will also work on system from
// Windows Vista to 10
// Windows vista to 10
// see https://stackoverflow.com/a/18792477 for details
func getFileNameByHandle(fd uintptr) (string, error) {
if procNtQueryObject == nil {
+1 -1
View File
@@ -1,4 +1,4 @@
FROM golang:1.26@sha256:f96cc555eb8db430159a3aa6797cd5bae561945b7b0fe7d0e284c63a3b291609
FROM golang:1.26@sha256:68cb6d68bed024785b69195b89af7ac7a444f27791435f98647edff595aa0479
ENV GOOS=linux
ENV GOARCH=arm
+1 -1
View File
@@ -1,4 +1,4 @@
FROM golang:1.26@sha256:f96cc555eb8db430159a3aa6797cd5bae561945b7b0fe7d0e284c63a3b291609
FROM golang:1.26@sha256:68cb6d68bed024785b69195b89af7ac7a444f27791435f98647edff595aa0479
ENV GOOS=linux
ENV GOARCH=arm64
+54 -89
View File
@@ -81,8 +81,6 @@ type config struct {
colorCodes bool
// custom colors to use for colorCodes
customColors map[string]string
// color to apply to spinner
spinnerColorCode string
// show rate of change in kB/sec or MB/sec
showBytes bool
@@ -292,13 +290,6 @@ func OptionSetCustomColorCodes(customColors map[string]string) Option {
}
}
// OptionSetSpinnerColorCode sets color code for spinner
func OptionSetSpinnerColorCode(colorCode string) Option {
return func(p *ProgressBar) {
p.config.spinnerColorCode = colorCode
}
}
// OptionSetElapsedTime will enable elapsed time. Always enabled if OptionSetPredictTime is true.
func OptionSetElapsedTime(elapsedTime bool) Option {
return func(p *ProgressBar) {
@@ -1123,74 +1114,6 @@ func getStringWidth(c config, str string) int {
return stringWidth
}
func renderDeterminateProgressBar(c config, s *state, bar, stats, leftBrac, rightBrac string) string {
if rightBrac == "" {
str := fmt.Sprintf("%4d%% %s %s",
s.currentPercent,
bar,
stats)
if (s.currentPercent == 100 && c.showElapsedTimeOnFinish) || c.elapsedTime {
str = fmt.Sprintf("%s [%s]", str, leftBrac)
}
if c.showDescriptionAtLineEnd {
return fmt.Sprintf("\r%s %s ", str, c.description)
}
return fmt.Sprintf("\r%s%s ", c.description, str)
}
if s.currentPercent == 100 {
str := fmt.Sprintf("%4d%% %s %s",
s.currentPercent,
bar,
stats)
if c.showElapsedTimeOnFinish {
str = fmt.Sprintf("%s [%s]", str, leftBrac)
}
if c.showDescriptionAtLineEnd {
return fmt.Sprintf("\r%s %s", str, c.description)
}
return fmt.Sprintf("\r%s%s", c.description, str)
}
str := fmt.Sprintf("%4d%% %s %s [%s:%s]",
s.currentPercent,
bar,
stats,
leftBrac,
rightBrac)
if c.showDescriptionAtLineEnd {
return fmt.Sprintf("\r%s %s", str, c.description)
}
return fmt.Sprintf("\r%s%s", c.description, str)
}
func fitProgressBarWidth(c config, s *state, barStart, barEnd, stats, leftBrac, rightBrac string) int {
if c.fullWidth || c.ignoreLength || c.width <= 0 {
return c.width
}
terminalWidth, err := termWidth(c.writer)
if err != nil || terminalWidth <= 0 {
return c.width
}
bar := barStart + strings.Repeat(c.theme.SaucerPadding, c.width) + barEnd
lineWidth := getStringWidth(c, renderDeterminateProgressBar(c, s, bar, stats, leftBrac, rightBrac))
if lineWidth <= terminalWidth {
return c.width
}
fitWidth := c.width - (lineWidth - terminalWidth)
if fitWidth < 0 {
return 0
}
return fitWidth
}
func renderProgressBar(c config, s *state) (int, error) {
var sb strings.Builder
@@ -1320,10 +1243,6 @@ func renderProgressBar(c config, s *state) (int, error) {
if (s.currentSaucerSize > 0 || s.currentPercent > 0) && c.theme.BarStartFilled != "" {
barStart = c.theme.BarStartFilled
}
c.width = fitProgressBarWidth(c, s, barStart, barEnd, sb.String(), leftBrac, rightBrac)
if !c.ignoreLength {
s.currentSaucerSize = int(float64(s.currentPercent) / 100.0 * float64(c.width))
}
if s.currentSaucerSize > 0 {
if c.ignoreLength {
saucer = strings.Repeat(c.theme.SaucerPadding, s.currentSaucerSize-1)
@@ -1375,10 +1294,6 @@ func renderProgressBar(c config, s *state) (int, error) {
spinner = selectedSpinner[s.spinnerIdx]
s.spinnerIdx = (s.spinnerIdx + 1) % len(selectedSpinner)
}
// if set add spinner color code
if c.spinnerColorCode != "" && c.colorCodes {
spinner = "[" + c.spinnerColorCode + "]" + spinner + "[reset]"
}
if c.elapsedTime {
if c.showDescriptionAtLineEnd {
str = fmt.Sprintf("\r%s %s [%s] %s ",
@@ -1407,11 +1322,61 @@ func renderProgressBar(c config, s *state) (int, error) {
}
}
} else if rightBrac == "" {
bar := barStart + saucer + saucerHead + strings.Repeat(c.theme.SaucerPadding, repeatAmount) + barEnd
str = renderDeterminateProgressBar(c, s, bar, sb.String(), leftBrac, rightBrac)
str = fmt.Sprintf("%4d%% %s%s%s%s%s %s",
s.currentPercent,
barStart,
saucer,
saucerHead,
strings.Repeat(c.theme.SaucerPadding, repeatAmount),
barEnd,
sb.String())
if (s.currentPercent == 100 && c.showElapsedTimeOnFinish) || c.elapsedTime {
str = fmt.Sprintf("%s [%s]", str, leftBrac)
}
if c.showDescriptionAtLineEnd {
str = fmt.Sprintf("\r%s %s ", str, c.description)
} else {
str = fmt.Sprintf("\r%s%s ", c.description, str)
}
} else {
bar := barStart + saucer + saucerHead + strings.Repeat(c.theme.SaucerPadding, repeatAmount) + barEnd
str = renderDeterminateProgressBar(c, s, bar, sb.String(), leftBrac, rightBrac)
if s.currentPercent == 100 {
str = fmt.Sprintf("%4d%% %s%s%s%s%s %s",
s.currentPercent,
barStart,
saucer,
saucerHead,
strings.Repeat(c.theme.SaucerPadding, repeatAmount),
barEnd,
sb.String())
if c.showElapsedTimeOnFinish {
str = fmt.Sprintf("%s [%s]", str, leftBrac)
}
if c.showDescriptionAtLineEnd {
str = fmt.Sprintf("\r%s %s", str, c.description)
} else {
str = fmt.Sprintf("\r%s%s", c.description, str)
}
} else {
str = fmt.Sprintf("%4d%% %s%s%s%s%s %s [%s:%s]",
s.currentPercent,
barStart,
saucer,
saucerHead,
strings.Repeat(c.theme.SaucerPadding, repeatAmount),
barEnd,
sb.String(),
leftBrac,
rightBrac)
if c.showDescriptionAtLineEnd {
str = fmt.Sprintf("\r%s %s", str, c.description)
} else {
str = fmt.Sprintf("\r%s%s", c.description, str)
}
}
}
if c.colorCodes {
+4 -4
View File
@@ -419,8 +419,8 @@ github.com/lucasb-eyer/go-colorful
# github.com/mattn/go-colorable v0.1.14
## explicit; go 1.18
github.com/mattn/go-colorable
# github.com/mattn/go-isatty v0.0.22
## explicit; go 1.21
# github.com/mattn/go-isatty v0.0.20
## explicit; go 1.15
github.com/mattn/go-isatty
# github.com/mattn/go-localereader v0.0.1
## explicit
@@ -530,8 +530,8 @@ github.com/rivo/uniseg
# github.com/russross/blackfriday/v2 v2.1.0
## explicit
github.com/russross/blackfriday/v2
# github.com/schollz/progressbar/v3 v3.19.1
## explicit; go 1.25.0
# github.com/schollz/progressbar/v3 v3.19.0
## explicit; go 1.22
github.com/schollz/progressbar/v3
# github.com/sergi/go-diff v1.4.0
## explicit; go 1.13