@neferbyte/cherry-release-cli 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/cherry-release +16 -14
  2. package/package.json +1 -1
@@ -165,35 +165,37 @@ echo -e " \033[1;32m✓\033[0m development released"
165
165
 
166
166
  # --- staging ---
167
167
  staging_commits=(${COMMITS_FOR[staging]})
168
- step "Deploying to staging (${#staging_commits[@]} commit(s))"
169
-
170
- git checkout staging
171
- git reset --hard origin/staging --quiet
172
168
  if [[ ${#staging_commits[@]} -gt 0 ]]; then
169
+ step "Deploying to staging (${#staging_commits[@]} commit(s))"
170
+ git checkout staging
171
+ git reset --hard origin/staging --quiet
173
172
  for hash in "${staging_commits[@]}"; do
174
173
  git cherry-pick "$hash"
175
174
  done
176
175
  git push origin staging
176
+ "$SCRIPT_DIR/cherry-release-version" patch
177
+ git push --follow-tags origin staging
178
+ echo -e " \033[1;32m✓\033[0m staging released"
179
+ else
180
+ echo -e "\n\033[1;34m→\033[0m Skipping staging (up to date)"
177
181
  fi
178
- "$SCRIPT_DIR/cherry-release-version" patch
179
- git push --follow-tags origin staging
180
- echo -e " \033[1;32m✓\033[0m staging released"
181
182
 
182
183
  # --- production ---
183
184
  production_commits=(${COMMITS_FOR[production]})
184
- step "Deploying to production (${#production_commits[@]} commit(s))"
185
-
186
- git checkout production
187
- git reset --hard origin/production --quiet
188
185
  if [[ ${#production_commits[@]} -gt 0 ]]; then
186
+ step "Deploying to production (${#production_commits[@]} commit(s))"
187
+ git checkout production
188
+ git reset --hard origin/production --quiet
189
189
  for hash in "${production_commits[@]}"; do
190
190
  git cherry-pick "$hash"
191
191
  done
192
192
  git push origin production
193
+ "$SCRIPT_DIR/cherry-release-version" patch
194
+ git push --follow-tags origin production
195
+ echo -e " \033[1;32m✓\033[0m production released"
196
+ else
197
+ echo -e "\n\033[1;34m→\033[0m Skipping production (up to date)"
193
198
  fi
194
- "$SCRIPT_DIR/cherry-release-version" patch
195
- git push --follow-tags origin production
196
- echo -e " \033[1;32m✓\033[0m production released"
197
199
 
198
200
  # ─── Phase 3: Cleanup ────────────────────────────────────────────────────────
199
201
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neferbyte/cherry-release-cli",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Cherry-pick commits across environment branches and tag releases",
5
5
  "license": "MIT",
6
6
  "bin": {