Skip to content

Commit 01d6ee6

Browse files
committed
try to unify all versions to one
1 parent cdf0850 commit 01d6ee6

File tree

5 files changed

+53
-6
lines changed

5 files changed

+53
-6
lines changed

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.7.0

clients/js/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "starship-js",
3-
"version": "0.0.1",
3+
"version": "3.7.0",
44
"author": "Dan Lynch <[email protected]>",
55
"private": true,
66
"repository": {
@@ -21,9 +21,11 @@
2121
"lint": "lerna run lint",
2222
"format": "lerna run format",
2323
"postinstall": "yarn symlink",
24-
"publish": "yarn build; yarn lerna publish --no-private",
25-
"publish:minor": "yarn build; yarn lerna publish minor --no-private",
26-
"publish:major": "yarn build; yarn lerna publish major --no-private"
24+
"version": "bash ../../scripts/sync-version.sh sync",
25+
"prepublishOnly": "yarn build",
26+
"publish": "lerna version --conventional-commits --yes && lerna publish from-package --yes",
27+
"publish:minor": "lerna version minor --conventional-commits --yes && lerna publish from-package --yes",
28+
"publish:major": "lerna version major --conventional-commits --yes && lerna publish from-package --yes"
2729
},
2830
"devDependencies": {
2931
"@types/jest": "^29.5.11",

clients/js/packages/starshipjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "starshipjs",
3-
"version": "3.3.0",
3+
"version": "3.7.0",
44
"author": "Dan Lynch <[email protected]>",
55
"description": "JS utilities for Starship",
66
"main": "index.js",

scripts/sync-version.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
3+
# Exit on error
4+
set -e
5+
6+
# Function to read version from VERSION file
7+
read_version() {
8+
cat VERSION | tr -d '[:space:]'
9+
}
10+
11+
# Function to sync version across all files
12+
sync_version() {
13+
local version=$1
14+
echo "Syncing version $version across all files..."
15+
16+
# Update Chart.yaml
17+
echo "Updating Chart.yaml..."
18+
sed -i '' "s/^version: .*/version: $version/" starship/charts/devnet/Chart.yaml
19+
20+
# Update root package.json
21+
echo "Updating root package.json..."
22+
sed -i '' "s/\"version\": \".*\"/\"version\": \"$version\"/" clients/js/package.json
23+
24+
# Update all package.json files in packages
25+
echo "Updating package.json files in packages..."
26+
find clients/js/packages -name "package.json" -exec sed -i '' "s/\"version\": \".*\"/\"version\": \"$version\"/" {} \;
27+
28+
echo "Version sync complete!"
29+
}
30+
31+
# Main script logic
32+
case "$1" in
33+
"read")
34+
read_version
35+
;;
36+
"sync")
37+
version=$(read_version)
38+
sync_version "$version"
39+
;;
40+
*)
41+
echo "Usage: $0 {read|sync}"
42+
exit 1
43+
;;
44+
esac

starship/charts/devnet/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.6.0
18+
version: 3.7.0
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

0 commit comments

Comments
 (0)