Update Cursor to version 1.7.54 and enhance update-cursor.sh for improved output handling

- Updated Cursor version, URL, and SHA256 in flake.nix
- Refined output handling in update-cursor.sh to check for GITHUB_OUTPUT before writing status information
This commit is contained in:
TudorAndrei
2025-10-29 13:53:32 +02:00
parent 2394f4c9ac
commit 4e9ae399b7
+9 -3
View File
@@ -103,12 +103,16 @@ main() {
# Check if update is needed
if [[ "$target_version" == "$current_version" ]]; then
echo "No update needed. Current version is up to date."
echo "CURSOR_VERSION_INFO=no_update" >> "$GITHUB_OUTPUT" 2>/dev/null || true
if [[ -n "${GITHUB_OUTPUT:-}" ]]; then
echo "CURSOR_VERSION_INFO=no_update" >> "$GITHUB_OUTPUT"
fi
exit 0
fi
echo "Update needed: $current_version -> $target_version"
echo "CURSOR_VERSION_INFO=updated:$current_version:$target_version" >> "$GITHUB_OUTPUT" 2>/dev/null || true
if [[ -n "${GITHUB_OUTPUT:-}" ]]; then
echo "CURSOR_VERSION_INFO=updated:$current_version:$target_version" >> "$GITHUB_OUTPUT"
fi
# Check if running in CI/GitHub Actions (auto-confirm)
if [[ -n "${CI:-}" ]] || [[ -n "${GITHUB_ACTIONS:-}" ]]; then
@@ -123,7 +127,9 @@ main() {
update_flake "$target_version"
test_flake
echo "Update completed successfully!"
echo "CURSOR_VERSION_INFO=completed:$current_version:$target_version" >> "$GITHUB_OUTPUT" 2>/dev/null || true
if [[ -n "${GITHUB_OUTPUT:-}" ]]; then
echo "CURSOR_VERSION_INFO=completed:$current_version:$target_version" >> "$GITHUB_OUTPUT"
fi
echo "You can now commit the changes:"
echo " git add flake.nix"
echo " git commit -m \"Update Cursor to version $target_version\""