Skip to content

Commit

Permalink
Add prepare_version script
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstyl committed Jul 29, 2024
1 parent a1dccc6 commit 3fdb6d9
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions scripts/prepare_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# Define the root directory as the current directory
root_dir=$(pwd)

# Read the version from the keyboard
read -p "Enter docs version (e.g 1.0.0): " version

# Find and update the version in .md files
find "$root_dir" -type f -name "*.md" -exec sed -i '' "s/implementation(\"com\.composables:core:[^\"]*\")/implementation(\"com.composables:core:$version\")/g" {} +

# Read the version from the keyboard
read -p "Enter WIP version (e.g., 1.8.0): " version

# Update the publishVersion value in build.gradle.kts
sed -i '' "s/^val publishVersion = \".*\"/val publishVersion = \"$version\"/" "$root_dir/core/build.gradle.kts"

# Add all changes to git
git add .

# Commit with the provided version in the message
git commit -m "Prepare version $version"

echo "👍 Updated all files and created a git commit"

0 comments on commit 3fdb6d9

Please sign in to comment.