-
Notifications
You must be signed in to change notification settings - Fork 35
feature: try to unify all versions to one #661
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
Open
Anmol1696
wants to merge
1
commit into
main
Choose a base branch
from
anmol/unify-version
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.7.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "starship-js", | ||
"version": "0.0.1", | ||
"version": "3.7.0", | ||
"author": "Dan Lynch <[email protected]>", | ||
"private": true, | ||
"repository": { | ||
|
@@ -21,9 +21,11 @@ | |
"lint": "lerna run lint", | ||
"format": "lerna run format", | ||
"postinstall": "yarn symlink", | ||
"publish": "yarn build; yarn lerna publish --no-private", | ||
"publish:minor": "yarn build; yarn lerna publish minor --no-private", | ||
"publish:major": "yarn build; yarn lerna publish major --no-private" | ||
"version": "bash ../../scripts/sync-version.sh sync", | ||
"prepublishOnly": "yarn build", | ||
"publish": "lerna version --conventional-commits --yes && lerna publish from-package --yes", | ||
"publish:minor": "lerna version minor --conventional-commits --yes && lerna publish from-package --yes", | ||
"publish:major": "lerna version major --conventional-commits --yes && lerna publish from-package --yes" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^29.5.11", | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "starshipjs", | ||
"version": "3.3.0", | ||
"version": "3.7.0", | ||
"author": "Dan Lynch <[email protected]>", | ||
"description": "JS utilities for Starship", | ||
"main": "index.js", | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
# Exit on error | ||
set -e | ||
|
||
# Function to read version from VERSION file | ||
read_version() { | ||
cat VERSION | tr -d '[:space:]' | ||
} | ||
|
||
# Function to sync version across all files | ||
sync_version() { | ||
local version=$1 | ||
echo "Syncing version $version across all files..." | ||
|
||
# Update Chart.yaml | ||
echo "Updating Chart.yaml..." | ||
sed -i '' "s/^version: .*/version: $version/" starship/charts/devnet/Chart.yaml | ||
|
||
# Update root package.json | ||
echo "Updating root package.json..." | ||
sed -i '' "s/\"version\": \".*\"/\"version\": \"$version\"/" clients/js/package.json | ||
|
||
# Update all package.json files in packages | ||
echo "Updating package.json files in packages..." | ||
find clients/js/packages -name "package.json" -exec sed -i '' "s/\"version\": \".*\"/\"version\": \"$version\"/" {} \; | ||
|
||
echo "Version sync complete!" | ||
} | ||
|
||
# Main script logic | ||
case "$1" in | ||
"read") | ||
read_version | ||
;; | ||
"sync") | ||
version=$(read_version) | ||
sync_version "$version" | ||
;; | ||
*) | ||
echo "Usage: $0 {read|sync}" | ||
exit 1 | ||
;; | ||
esac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The in-place sed command using 'sed -i ''' may work on macOS but can cause issues on Linux (GNU sed) which uses a different syntax. Consider adding conditional handling or documentation to ensure cross-platform compatibility.
Copilot uses AI. Check for mistakes.