@@ -144,13 +144,27 @@ rm -f "$TAURI_CONF.bak"
144144
145145echo -e " ${GREEN} Updated versions in package.json and tauri.conf.json${NC} "
146146
147- # ── Commit version bump ──
147+ # ── Detect remote name ──
148+
149+ REMOTE=$( git -C " $PROJECT_DIR " remote | head -1)
150+ if [ -z " $REMOTE " ]; then
151+ echo -e " ${RED} Error: no git remote configured${NC} "
152+ exit 1
153+ fi
154+ BRANCH=$( git -C " $PROJECT_DIR " branch --show-current)
155+ echo " Remote: $REMOTE ($BRANCH )"
156+
157+ # ── Commit version bump (only if there are changes) ──
148158
149159cd " $PROJECT_DIR "
150160git add package.json src-tauri/tauri.conf.json
151- git commit -m " chore: bump version to $VERSION "
152161
153- echo -e " ${GREEN} Committed version bump${NC} "
162+ if git diff --cached --quiet; then
163+ echo -e " ${YELLOW} Version already at $VERSION , no commit needed${NC} "
164+ else
165+ git commit -m " chore: bump version to $VERSION "
166+ echo -e " ${GREEN} Committed version bump${NC} "
167+ fi
154168
155169# ── Create tag ──
156170
@@ -160,15 +174,15 @@ echo -e "${GREEN}Created tag v$VERSION${NC}"
160174# ── Push ──
161175
162176echo " "
163- read -p " Push to origin ? (y/N) " -n 1 -r
177+ read -p " Push to $REMOTE ? (y/N) " -n 1 -r
164178echo " "
165179if [[ $REPLY =~ ^[Yy]$ ]]; then
166- git push origin master --tags
167- echo -e " ${GREEN} Pushed to origin . GitHub Actions will build and create the release.${NC} "
180+ git push " $REMOTE " " $BRANCH " --tags
181+ echo -e " ${GREEN} Pushed to $REMOTE . GitHub Actions will build and create the release.${NC} "
168182else
169183 echo " "
170184 echo " To push manually:"
171- echo " git push origin master --tags"
185+ echo " git push $REMOTE $BRANCH --tags"
172186fi
173187
174188echo " "
0 commit comments