You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: Deleting a tag does NOT delete the GitHub Release. Delete the release manually from the GitHub UI if needed.
164
164
165
+
## Testing CLI Self-Update Locally
166
+
167
+
The `karate update --item cli` command can be tested without a real release using `KARATE_MANIFEST_URL` to point at a local HTTP server. The [`karate-sh`](https://github.com/karatelabs/karate-sh) repo (expected at `../karate-sh`) contains the production `manifest.json`.
# 3. Package it as a release archive and get the SHA256
178
+
tar czf /tmp/karate-update-test/serve/karate-cli.tar.gz \
179
+
-C /tmp/karate-update-test/bin karate
180
+
shasum -a 256 /tmp/karate-update-test/serve/karate-cli.tar.gz
181
+
```
182
+
183
+
4. Create `/tmp/karate-update-test/serve/manifest.json` using the SHA256 from above (replace `YOUR_SHA256` and adjust the platform key for your machine):
# 7. Verify the binary still works after replacement
233
+
/tmp/karate-update-test/bin/karate version
234
+
235
+
# 8. Clean up
236
+
kill$(lsof -ti:9999)2>/dev/null
237
+
rm -rf /tmp/karate-update-test
238
+
```
239
+
240
+
Note: The dev binary always reports `0.1.0` (from `Cargo.toml`), so it will always see `0.2.0-test` as an update. In production, the version is injected at release build time.
241
+
242
+
You can also test just the check/display phase via `cargo run` (no binary replacement):
0 commit comments