Skip to content

Commit 8d4d68e

Browse files
committed
Fix release script to create new commit instead of amending
- Change release.sh to create new version bump commit - Remove all README references from bump-version.sh
1 parent 3c9dbba commit 8d4d68e

2 files changed

Lines changed: 5 additions & 30 deletions

File tree

bump-version.sh

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ NC='\033[0m' # No Color
1313

1414
# Files to update
1515
CSPROJ_FILE="LocalizationManager.csproj"
16-
README_FILE="README.md"
1716

1817
# Function to display usage
1918
usage() {
@@ -108,24 +107,6 @@ update_csproj() {
108107
sed -i "s|<FileVersion>$old_assembly</FileVersion>|<FileVersion>$new_assembly</FileVersion>|g" "$CSPROJ_FILE"
109108
}
110109

111-
# Function to update README.md
112-
update_readme() {
113-
local old_version=$1
114-
local new_version=$2
115-
116-
if [ ! -f "$README_FILE" ]; then
117-
echo -e "${YELLOW}⚠ Warning: $README_FILE not found, skipping${NC}"
118-
return
119-
fi
120-
121-
# Note: README.md no longer needs version updates
122-
# - Archive names are now static (lrm-linux-x64.tar.gz) without version numbers
123-
# - Documentation uses /latest/ download URLs
124-
# - No version-specific references in README
125-
# This keeps the codebase clean - version is only in LocalizationManager.csproj and CHANGELOG.md
126-
127-
echo " Skipping README.md (no version-specific content)"
128-
}
129110

130111
# Main script
131112
main() {
@@ -169,7 +150,6 @@ main() {
169150
echo ""
170151
echo "Files to update:"
171152
echo -e " ${BLUE}${NC} $CSPROJ_FILE"
172-
[ -f "$README_FILE" ] && echo -e " ${BLUE}${NC} $README_FILE"
173153
echo ""
174154

175155
# Confirmation prompt (unless -y flag)
@@ -189,11 +169,6 @@ main() {
189169
update_csproj "$CURRENT_VERSION" "$NEW_VERSION"
190170
echo -e "${GREEN}${NC} Updated $CSPROJ_FILE"
191171

192-
if [ -f "$README_FILE" ]; then
193-
update_readme "$CURRENT_VERSION" "$NEW_VERSION"
194-
echo -e "${GREEN}${NC} Updated $README_FILE"
195-
fi
196-
197172
# Success message
198173
echo ""
199174
echo -e "${GREEN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"

release.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,11 @@ main() {
265265

266266
print_success "Generated CHANGELOG from commits"
267267

268-
# Amend the bump commit to include CHANGELOG changes
269-
print_step "Including CHANGELOG in version commit..."
270-
git add CHANGELOG.md
271-
git commit --amend --no-edit
272-
print_success "Amended version commit with CHANGELOG"
268+
# Create version bump commit
269+
print_step "Creating version bump commit..."
270+
git add LocalizationManager.csproj CHANGELOG.md
271+
git commit -m "Bump version to v${NEW_VERSION}"
272+
print_success "Created version bump commit"
273273

274274
# Store commit SHA for potential rollback
275275
BUMP_COMMIT=$(git rev-parse HEAD)

0 commit comments

Comments
 (0)