17 Commits

Author SHA1 Message Date
valknar a8523c50f2 feat: start ssh agent from .zlogin 2026-06-08 18:50:24 +02:00
valknar b870738f9a refactor: strip release cycle, monorepo, exec-lib, and source from arty.sh
- Remove whip/release-cycle commands: release, version, bump, changelog,
  tag, hooks (and all associated functions)
- Remove monorepo commands: mono/monorepo (and all associated functions)
- Remove exec command (exec_lib / .arty/bin runner)
- Remove source command (source_lib)
- Remove test/build scripts from init_project template
- Restore exec_script wildcard so arty.yml scripts (npm/install, etc.) still work
- Add auto-install for mikefarah/yq v4 with multi-method fallback
- Fix silent crash: command -v matched the yq shell wrapper function;
  switched to type -P and guarded version-check assignment with || true

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 00:10:32 +02:00
valknar 363e126914 fix: rewrite parse_reference without if-then-else (unsupported in yq v4)
The previous expression used `if ($r | type) == "!!str" then ... end`
which produces a lexer error in yq v4.50–v4.53. This caused every
parse_reference call to return empty output, silently skipping all
references — the root cause of the missing [INFO] messages and tree.

Replace with a single-line expression using only the // alternative
operator and select(), which work across all tested yq v4 versions:

  .references[N] | (.url // .) + "|" + (.into // "") + "|" +
  (.ref // "") + "|" +
  ((.env | select(tag == "!!seq") | join(",")) // .env // "")

.url // . handles both string refs (no .url key) and object refs.
env arrays are joined; null env falls back to "".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 23:18:24 +02:00
valknar d2bff00ee2 fix: prevent set -e crash when yq exits non-zero on IONOS
Two issues on IONOS shared hosting (very low ulimit -u):

1. bash 4.4+ propagates the exit code of command substitutions through
   `local var=$(cmd)`. When yq crashes (exit 2) the assignment itself
   returns 2, and set -e kills the script before any log message appears.
   Fixed by adding `|| return 0` to the yq wrapper so it always exits 0.

2. All ref_count comparisons checked for "null"/"0" but not for empty
   string. A yq call that produces no stdout (crashed but returned 0)
   leaves ref_count="", which neither guard caught — the arithmetic loop
   `i < ref_count` silently treated "" as 0 and skipped all references.
   Fixed by adding `[[ -z "$ref_count" ]]` to every ref_count guard.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 23:10:55 +02:00
valknar 90f7b58a53 fix: reduce yq forks per reference from 6 to 1, silence git thread errors
parse_reference was calling yq 5-7 times per reference. With 8 refs
that's ~48 fork+exec calls in rapid succession, saturating IONOS's
ulimit -u and causing intermittent empty 'into' fields — libraries then
installed to the wrong .arty/libs/ location instead of their configured
path.

Collapse all field reads into a single yq expression per reference.

Also add 2>/dev/null to git fetch/pull so the "getaddrinfo() thread
failed to start" message (another ulimit hit, in git's DNS resolver)
doesn't spam the output — the warn message still fires on failure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 22:59:40 +02:00
valknar 6d692cef57 fix: limit yq Go thread usage on hosts with low ulimit -u
IONOS shared hosting enforces a strict process limit. yq (a Go binary)
tries to spawn several OS threads at startup and crashes with
"failed to create new OS thread (errno=11 EAGAIN)" when the limit is
hit, returning empty stdout. This silently skips all references.

Wrap yq with GOMAXPROCS=1 GOGC=off so the Go runtime uses a single
goroutine-running thread and skips GC goroutines, staying within the
host's ulimit -u.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 22:52:35 +02:00
valknar 3153b6a24d fix: auto-detect terminal color support instead of forcing it
FORCE_COLOR defaulted to 1, emitting ANSI codes unconditionally. On SSH
sessions without a proper TTY or with TERM=dumb this caused color codes
to render text invisible. Now colors are enabled only when stdout is an
interactive terminal; FORCE_COLOR=1 can still override when needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 22:41:51 +02:00
valknar 640296d7d1 fix: gitconfig pull.ff only 2026-06-05 22:36:39 +02:00
valknar a4f1ba443d fix: route log output to stdout for SSH visibility
All log_* functions were writing to stderr, causing output to be
invisible in SSH sessions where stderr is not forwarded or captured.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 22:33:43 +02:00
valknar 8b4fa0dcb1 fix: replace corrupted bytes and respect remote default branch
Replace broken control characters and U+FFFD replacement characters in
log function labels with ASCII equivalents ([ok], [!], [x]).

Drop the hardcoded "main" default for git_ref so arty deps no longer
fails with "pathspec 'main' did not match" on repos whose default branch
is not named main — git clone already checks out the remote default branch.
A ref: value in arty.yml is still honoured when explicitly set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 22:15:18 +02:00
valknar 64d955094c chore: apt deps 2026-05-23 11:29:07 +02:00
valknar 25617ce490 feat: add scripts/arty.sh 2026-03-30 19:40:37 +02:00
valknar 6206a2303f feat: sdkman support 2026-03-27 10:27:32 +01:00
valknar 103c22f7c5 fix: remove gvm 2026-03-18 16:49:17 +01:00
valknar ad1c43edea chore: add LICENSE, cleanup README.md 2026-03-17 16:59:08 +01:00
valknar 4df40730a5 chore: cleanup .editorconfig 2026-03-17 12:08:13 +01:00
valknar 8c6f0a733f Initial commit 2026-03-17 12:04:51 +01:00