modes: [release, debug], release first as the default; build-apk.sh already takes the mode as its last argument, which is how Dev Updater passes it. enroll: goes through server/enroll-link.sh rather than the binary directly, because the command is handed the app's mode too and because the server may have been built in either profile -- the wrapper ignores the word and takes whichever ai-server exists, release first. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
18 lines
739 B
Bash
Executable File
18 lines
739 B
Bash
Executable File
#!/bin/sh
|
|
# Prints an enrollment link for one more phone -- `ai-server --enroll-link`,
|
|
# see that flag's help. This is what Dev Updater's Enroll button runs, from
|
|
# the checkout root, with the *app's* build mode as a trailing argument
|
|
# (every command a component declares gets it). The mode does not bear on
|
|
# the server, so it is ignored: the link comes from whichever ai-server has
|
|
# been built here, release first, and the message below is what the card
|
|
# shows when neither exists.
|
|
set -eu
|
|
cd "$(dirname "$0")"
|
|
for bin in target/release/ai-server target/debug/ai-server; do
|
|
if [ -x "$bin" ]; then
|
|
exec "$bin" --enroll-link
|
|
fi
|
|
done
|
|
echo "ai-server is not built here yet -- update the server component first" >&2
|
|
exit 1
|