Revert "docs(jetbrains): add dev snapshot build guidance"

This reverts commit 084dd5cea6.
This commit is contained in:
kirillk
2026-07-13 19:15:56 -04:00
parent 8a859e49bd
commit e9743c3058
2 changed files with 6 additions and 31 deletions
-22
View File
@@ -230,28 +230,6 @@ For the full release process (resolve version, pin verification, prepare, change
- **Run split backend**: `./gradlew --no-configuration-cache runIdeBackend` — if it exits shortly after startup, check for an orphaned Java process from a previous backend run and kill it before restarting.
- **Run in monolithic sandbox**: `./gradlew runIde` — launches sandboxed IntelliJ with the plugin. Does not build or bundle CLI binaries; the backend downloads the pinned release at connect time.
### Dev Snapshot Builds
Use dev snapshots for local installable ZIPs that should never be published. The version must be the current JetBrains plugin version from `gradle.properties`, plus the username and a UTC timestamp: `<current>-dev.<user>.<yyyyMMddTHHmmssZ>`. Do not use `script/build-version.sh` for snapshots because it is for releasable versions only.
Run from `packages/kilo-jetbrains/`:
```bash
base="$(bun -e 'const text = await Bun.file("gradle.properties").text(); const match = text.match(/^kilo\\.jetbrains\\.version=(.+)$/m); if (!match) throw new Error("Missing kilo.jetbrains.version"); console.log(match[1].trim())')"
user="$(bun -e 'const raw = process.env.USER || process.env.LOGNAME || "user"; const safe = raw.toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, ""); console.log(safe || "user")')"
stamp="$(date -u +%Y%m%dT%H%M%SZ)"
version="${base}-dev.${user}.${stamp}"
./gradlew clean buildPlugin -Pkilo.version="$version" -Pkilo.channel=eap
zip="$(pwd)/$(ls -t build/distributions/*.zip | head -n 1)"
dir="$(dirname "$zip")"
printf 'JetBrains dev snapshot ZIP: %s\n' "$zip"
printf 'JetBrains dev snapshot directory: %s\n' "$dir"
```
If the snapshot must bundle the local repo CLI instead of downloading the pinned CLI release, first set `kilo.cli.pinned=false` and run `./gradlew :backend:buildRepoCli` from `packages/kilo-jetbrains/`; restore `kilo.cli.pinned=true` before any release work.
### CLI/SDK Change Awareness
- JetBrains runtime behavior normally depends on the downloaded CLI release pinned by `packages/kilo-jetbrains/package.json`; local `packages/opencode/` changes are used only with `kilo.cli.pinned=false` repo CLI mode.
+6 -9
View File
@@ -21,12 +21,10 @@ fun port(value: String): Int {
return n
}
fun checked(value: String, production: Boolean): String {
val release = Regex("^[0-9]+\\.[0-9]+\\.[0-9]+(-rc\\.[0-9]+)?$")
val snapshot = Regex("^[0-9]+\\.[0-9]+\\.[0-9]+-dev\\.[A-Za-z0-9._-]+\\.[0-9]{8}T[0-9]{6}Z$")
if (!production && value == "0.0.0-dev") return value
require(release.matches(value) || (!production && snapshot.matches(value))) {
"Invalid JetBrains plugin version: $value. Expected x.y.z, x.y.z-rc.n, or dev-only x.y.z-dev.<user>.<timestamp>."
fun checked(value: String): String {
if (value == "0.0.0-dev") return value
require(Regex("^[0-9]+\\.[0-9]+\\.[0-9]+(-rc\\.[0-9]+)?$").matches(value)) {
"Invalid JetBrains plugin version: $value"
}
return value
}
@@ -88,10 +86,9 @@ val pinned = providers.gradleProperty("kilo.cli.pinned").map { it.trim().toBoole
val override = providers.gradleProperty("kilo.version").orNull?.trim()?.takeIf { it.isNotEmpty() }
val prop = providers.gradleProperty("kilo.jetbrains.version").orNull?.trim()?.takeIf { it.isNotEmpty() }
val tag = gitTag()?.removePrefix("jetbrains/v")
val ver = override?.let { checked(it, release) } ?: prop?.let { checked(it, release) } ?: if (release) checked(
val ver = override?.let(::checked) ?: prop?.let(::checked) ?: if (release) checked(
tag ?: error("Missing JetBrains plugin version. Publish builds must set kilo.jetbrains.version or run from a jetbrains/v<version> tag."),
release,
) else checked(tag ?: "0.0.0-dev", release)
) else checked(tag ?: "0.0.0-dev")
if (release && !pinned) error(
"kilo.cli.pinned=false is a dev-only mode and cannot be released. Set kilo.cli.pinned=true before a production/publish build."