Skip to content

Commit c082b8d

Browse files
committed
fix: add export mode to get_version_info.sh; fix comments and error message
- get_version_info.sh: add 'export' mode (eval-safe VAR=value lines) that prod.sh was already calling but was falling through to the human-readable default, causing eval to fail on the "Version: ..." output. Also switch == to = in [ ] comparisons (shellcheck SC2039). - serve/release.sh: error hint now points to the correct MISE_ENV=dev ./bin/mise invocation instead of bare `mise`. - mise.dev.toml: update task→file mapping comments to include .sh extension to match the actual committed filenames.
1 parent a2f8676 commit c082b8d

3 files changed

Lines changed: 19 additions & 12 deletions

File tree

mise-tasks/serve/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
set -euo pipefail
55
if [ ! -d "build/web" ]; then
66
echo "Error: build/web directory not found"
7-
echo "Run: mise run build:web first"
7+
echo "Run: MISE_ENV=dev ./bin/mise run build:web first"
88
exit 1
99
fi
1010

mise.dev.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
# All tasks moved to mise-tasks/ for better maintainability and shellcheck/shfmt support:
1818
# - dev -> mise-tasks/dev.sh
1919
# - test:e2e -> mise-tasks/test/e2e.sh
20-
# - test:e2e:ui -> mise-tasks/test/e2e/ui
21-
# - test:e2e:headed -> mise-tasks/test/e2e/headed
20+
# - test:e2e:ui -> mise-tasks/test/e2e/ui.sh
21+
# - test:e2e:headed -> mise-tasks/test/e2e/headed.sh
2222
# - build:web -> mise-tasks/build/web.sh
23-
# - serve:release -> mise-tasks/serve/release
24-
# - test:check-page -> mise-tasks/test/check-page
25-
# - screenshots:batch -> mise-tasks/screenshots/batch
26-
# - setup:tunnel -> mise-tasks/setup/tunnel
27-
# - setup:playwright -> mise-tasks/setup/playwright
28-
# - dev:tunnel -> mise-tasks/dev/tunnel
29-
# - build:web:prod -> mise-tasks/build/web/prod
23+
# - serve:release -> mise-tasks/serve/release.sh
24+
# - test:check-page -> mise-tasks/test/check-page.sh
25+
# - screenshots:batch -> mise-tasks/screenshots/batch.sh
26+
# - setup:tunnel -> mise-tasks/setup/tunnel.sh
27+
# - setup:playwright -> mise-tasks/setup/playwright.sh
28+
# - dev:tunnel -> mise-tasks/dev/tunnel.sh
29+
# - build:web:prod -> mise-tasks/build/web/prod.sh

scripts/get_version_info.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,21 @@ else
2525
fi
2626

2727
# Output format for GitHub Actions
28-
if [ "$1" == "github" ]; then
28+
if [ "$1" = "github" ]; then
2929
echo "git_tag=$GIT_TAG"
3030
echo "git_commit=$GIT_COMMIT"
3131
echo "git_branch=$GIT_BRANCH"
3232
echo "version=$VERSION"
3333
echo "build_time=$BUILD_TIME"
34+
# Output format for eval (used by mise-tasks/build/web/prod.sh)
35+
elif [ "$1" = "export" ]; then
36+
echo "export GIT_TAG=\"$GIT_TAG\""
37+
echo "export GIT_COMMIT=\"$GIT_COMMIT\""
38+
echo "export GIT_BRANCH=\"$GIT_BRANCH\""
39+
echo "export BUILD_VERSION=\"$VERSION\""
40+
echo "export BUILD_TIME=\"$BUILD_TIME\""
3441
# Output format for --dart-define flags
35-
elif [ "$1" == "dart-define" ]; then
42+
elif [ "$1" = "dart-define" ]; then
3643
echo "--dart-define=GIT_TAG=$GIT_TAG --dart-define=GIT_COMMIT=$GIT_COMMIT --dart-define=GIT_BRANCH=$GIT_BRANCH --dart-define=BUILD_VERSION=$VERSION --dart-define=BUILD_TIME=$BUILD_TIME"
3744
# Output format for human reading
3845
else

0 commit comments

Comments
 (0)