Skip to content

Commit ff98b86

Browse files
committed
Fix: Wrong installation URL
Signed-off-by: Jakub Dzikowski <jakub.t.dzikowski@gmail.com>
1 parent d3f86d2 commit ff98b86

4 files changed

Lines changed: 42 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ jobs:
2323
- name: Run core test suite (unit, acceptance, fixture snapshots)
2424
run: npm test
2525

26+
- name: Verify public install URL (jaiph use default path)
27+
run: curl -fsSL -o /dev/null --retry 3 --retry-delay 1 https://jaiph.org/install
28+
29+
- name: Verify git tag for package version exists (canonical repo)
30+
run: |
31+
VERSION="$(node -p "require('./package.json').version")"
32+
git ls-remote --exit-code https://github.com/jaiphlang/jaiph.git "refs/tags/v${VERSION}"
33+
2634
e2e:
2735
name: E2E install and CLI workflow (${{ matrix.os }})
2836
runs-on: ${{ matrix.os }}

docs/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ defaults:
2727

2828
exclude:
2929
- vendor
30-
- install
30+
# Keep install-from-local.sh out of the site (developer-only).
3131
- install-from-local.sh
3232
- CNAME

e2e/test_all.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ trap e2e::cleanup EXIT
88

99
TEST_SCRIPTS=(
1010
"e2e/tests/00_install_and_init.sh"
11+
"e2e/tests/05_jaiph_use_pinned_version.sh"
1112
"e2e/tests/10_basic_workflows.sh"
1213
"e2e/tests/20_rule_and_prompt.sh"
1314
"e2e/tests/22_assign_capture.sh"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
6+
source "${ROOT_DIR}/e2e/lib/common.sh"
7+
trap e2e::cleanup EXIT
8+
9+
e2e::prepare_test_env "jaiph_use_pinned"
10+
11+
VERSION="$(node -p "require('${E2E_REPO_ROOT}/package.json').version")"
12+
USE_BIN="${JAIPH_E2E_TEST_DIR}/use_bin"
13+
mkdir -p "${USE_BIN}"
14+
export JAIPH_BIN_DIR="${USE_BIN}"
15+
export JAIPH_LIB_DIR="${USE_BIN}/.jaiph"
16+
17+
e2e::section "jaiph use <package.json version> reinstalls via installer"
18+
19+
export JAIPH_INSTALL_COMMAND="bash \"${E2E_REPO_ROOT}/docs/install\" \"${E2E_REPO_ROOT}\""
20+
use_combined="$(jaiph use "${VERSION}" 2>&1)"
21+
e2e::assert_contains "${use_combined}" "Reinstalling Jaiph from ref 'v${VERSION}'" \
22+
"jaiph use prints expected git ref for pinned version"
23+
24+
if [[ ! -x "${USE_BIN}/jaiph" ]]; then
25+
e2e::fail "installer did not place jaiph in JAIPH_BIN_DIR"
26+
fi
27+
28+
ver_out="$("${USE_BIN}/jaiph" --version 2>&1)"
29+
e2e::assert_contains "${ver_out}" "jaiph ${VERSION}" \
30+
"reinstalled jaiph --version matches package.json"
31+
32+
e2e::pass "jaiph use ${VERSION} with local docs/install"

0 commit comments

Comments
 (0)