8000 chore: fix autoversion script and update experiments/docs versions by bpmct · Pull Request #17954 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

chore: fix autoversion script and update experiments/docs versions #17954

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 22, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
8000 Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: update experiment parsing script to use ExperimentsSafe ins…
…tead of ExperimentsAll
  • Loading branch information
bpmct committed May 20, 2025
commit b4ed9d258d752befbdbe9eab360b6ad05d38ea75
21 changes: 18 additions & 3 deletions scripts/release/docs_update_experiments.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,24 @@ sparse_clone_codersdk() {
}

parse_all_experiments() {
go doc -all -C "${dir}" ./codersdk ExperimentsAll |
# Try ExperimentsSafe first, then fall back to ExperimentsAll if needed
experiments_var="ExperimentsSafe"
experiments_output=$(go doc -all -C "${dir}" ./codersdk "${experiments_var}" 2>/dev/null || true)

if [[ -z "${experiments_output}" ]]; then
# Fall back to ExperimentsAll if ExperimentsSafe is not found
experiments_var="ExperimentsAll"
experiments_output=$(go doc -all -C "${dir}" ./codersdk "${experiments_var}" 2>/dev/null || true)

if [[ -z "${experiments_output}" ]]; then
log "Warning: Neither ExperimentsSafe nor ExperimentsAll found in ${dir}"
return
fi
fi

echo "${experiments_output}" |
tr -d $'\n\t ' |
grep -E -o 'ExperimentsAll=Experiments\{[^}]*\}' |
grep -E -o "${experiments_var}=Experiments\{[^}]*\}" |
sed -e 's/.*{\(.*\)}.*/\1/' |
tr ',' '\n'
}
Expand Down Expand Up @@ -128,7 +143,7 @@ for channel in mainline stable; do
maybe_desc=

if [[ ! -v all_experiments[$var] ]]; then
log "Skipping ${var}, not listed in ExperimentsAll"
log "Skipping ${var}, not listed in experiments list"
continue
fi

Expand Down
0