Skip to content
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

Improves version extraction in installation script #1048

Merged
merged 1 commit into from
Dec 26, 2024

Conversation

fortran01
Copy link
Contributor


name: Cross-platform Version Parsing Update
about: Updates version parsing logic in install script
title: "[PR] Improve version extraction for cross-platform compatibility"
labels: 'enhancement'
assignees: ''

Description

Updates the version extraction logic in the install script to use a more robust and cross-platform compatible approach using grep and sed. This change improves reliability when parsing GitHub release versions across different platforms and shell environments.

The new implementation:

  • Uses a more reliable grep pattern that handles varying whitespace
  • Simplifies the parsing chain to reduce potential points of failure
  • Maintains compatibility across different Unix-like systems

Related issue: N/A

How to Test

  1. Run the install script on different platforms (macOS, Linux) to verify version extraction:
    ./install.sh
  2. Verify that the script correctly extracts the version number from GitHub releases
  3. Check that the extracted version matches the latest release on the GitHub repository

Screenshots/Proof

The script successfully extracts version "x.y.z" from the GitHub API response:

Before: echo "$LATEST_RELEASE" | grep -o '"tag_name": "v[^"]*"' | cut -d'"' -f4 | sed 's/^v//'
After:  echo "$LATEST_RELEASE" | grep -o '"tag_name": *"v[^"]*"' | sed 's/.*"v\([^"]*\)".*/\1/'

Updates version parsing logic to use more robust grep and sed approach

Enhances cross-platform compatibility for extracting GitHub release version
Removes potential parsing inconsistencies in version extraction
Copy link

vercel bot commented Dec 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
screenpipe ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 24, 2024 11:25pm

@louis030195
Copy link
Collaborator

/tip $30 @fortran01

thx!

@louis030195 louis030195 merged commit a296dac into mediar-ai:main Dec 26, 2024
2 checks passed
Copy link

algora-pbc bot commented Dec 26, 2024

@fortran01: You just got a $30 tip! 👉 Complete your Algora onboarding to collect your payment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants