refactor(ci): update product options to be more specific
🔄 Changed product option values: - worker → worker-mobile-app - client → client-mobile-app 📝 Updated Files: - .github/workflows/hotfix-branch-creation.yml - .github/workflows/product-release.yml - .github/scripts/extract-version.sh - .github/scripts/extract-release-notes.sh - .github/scripts/create-release-summary.sh - .github/scripts/generate-tag-name.sh 🎯 Key Changes: - Product dropdown options now more specific - All conditional checks updated to use new values - Tag/branch names remain clean (strips -mobile-app suffix) - Tag format unchanged: krow-withus-worker-mobile/prod-v0.1.0 - Branch format unchanged: hotfix/krow-withus-worker-mobile-v0.1.0 Benefits: ✅ Clearer product selection (distinguishes mobile from future web/backend) ✅ Backward compatible tag format ✅ Maintains clean naming conventions
This commit is contained in:
2
.github/scripts/create-release-summary.sh
vendored
2
.github/scripts/create-release-summary.sh
vendored
@@ -16,7 +16,7 @@ if [ -z "$APP" ] || [ -z "$ENV" ] || [ -z "$VERSION" ] || [ -z "$TAG_NAME" ]; th
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Determine display names
|
# Determine display names
|
||||||
if [ "$APP" = "worker" ]; then
|
if [ "$APP" = "worker-mobile-app" ]; then
|
||||||
APP_DISPLAY="Worker Product"
|
APP_DISPLAY="Worker Product"
|
||||||
APP_EMOJI="👷"
|
APP_EMOJI="👷"
|
||||||
else
|
else
|
||||||
|
|||||||
2
.github/scripts/extract-release-notes.sh
vendored
2
.github/scripts/extract-release-notes.sh
vendored
@@ -17,7 +17,7 @@ if [ -z "$APP" ] || [ -z "$VERSION" ] || [ -z "$ENV" ] || [ -z "$TAG_NAME" ] ||
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Determine CHANGELOG path and app name
|
# Determine CHANGELOG path and app name
|
||||||
if [ "$APP" = "worker" ]; then
|
if [ "$APP" = "worker-mobile-app" ]; then
|
||||||
CHANGELOG_PATH="apps/mobile/apps/staff/CHANGELOG.md"
|
CHANGELOG_PATH="apps/mobile/apps/staff/CHANGELOG.md"
|
||||||
APP_NAME="Staff Product (Worker)"
|
APP_NAME="Staff Product (Worker)"
|
||||||
else
|
else
|
||||||
|
|||||||
6
.github/scripts/extract-version.sh
vendored
6
.github/scripts/extract-version.sh
vendored
@@ -1,19 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Extract version from version file for products
|
# Extract version from version file for products
|
||||||
# Usage: ./extract-version.sh <app>
|
# Usage: ./extract-version.sh <app>
|
||||||
# app: worker or client
|
# app: worker-mobile-app or client-mobile-app
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
APP=$1
|
APP=$1
|
||||||
|
|
||||||
if [ -z "$APP" ]; then
|
if [ -z "$APP" ]; then
|
||||||
echo "❌ Error: App parameter required (worker or client)"
|
echo "❌ Error: App parameter required (worker-mobile-app or client-mobile-app)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Determine pubspec path
|
# Determine pubspec path
|
||||||
if [ "$APP" = "worker" ]; then
|
if [ "$APP" = "worker-mobile-app" ]; then
|
||||||
PUBSPEC_PATH="apps/mobile/apps/staff/pubspec.yaml"
|
PUBSPEC_PATH="apps/mobile/apps/staff/pubspec.yaml"
|
||||||
APP_NAME="Staff Product (Worker)"
|
APP_NAME="Staff Product (Worker)"
|
||||||
else
|
else
|
||||||
|
|||||||
6
.github/scripts/generate-tag-name.sh
vendored
6
.github/scripts/generate-tag-name.sh
vendored
@@ -14,5 +14,9 @@ if [ -z "$APP" ] || [ -z "$ENV" ] || [ -z "$VERSION" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TAG_NAME="krow-withus-${APP}-mobile/${ENV}-v${VERSION}"
|
# Strip -mobile-app suffix from app name for cleaner tag names
|
||||||
|
# worker-mobile-app -> worker, client-mobile-app -> client
|
||||||
|
APP_TAG=$(echo "$APP" | sed 's/-mobile-app$//')
|
||||||
|
|
||||||
|
TAG_NAME="krow-withus-${APP_TAG}-mobile/${ENV}-v${VERSION}"
|
||||||
echo "$TAG_NAME"
|
echo "$TAG_NAME"
|
||||||
|
|||||||
29
.github/workflows/hotfix-branch-creation.yml
vendored
29
.github/workflows/hotfix-branch-creation.yml
vendored
@@ -8,8 +8,8 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
- worker
|
- worker-mobile-app
|
||||||
- client
|
- client-mobile-app
|
||||||
tag:
|
tag:
|
||||||
description: '🏷️ Current Tag (e.g., krow-withus-worker-mobile/prod-v0.1.0 or dev/stage)'
|
description: '🏷️ Current Tag (e.g., krow-withus-worker-mobile/prod-v0.1.0 or dev/stage)'
|
||||||
required: true
|
required: true
|
||||||
@@ -78,7 +78,10 @@ jobs:
|
|||||||
APP="${{ github.event.inputs.app }}"
|
APP="${{ github.event.inputs.app }}"
|
||||||
VERSION="${{ steps.hotfix_version.outputs.hotfix_version }}"
|
VERSION="${{ steps.hotfix_version.outputs.hotfix_version }}"
|
||||||
|
|
||||||
BRANCH_NAME="hotfix/krow-withus-${APP}-mobile-v${VERSION}"
|
# Strip -mobile-app suffix for cleaner branch names
|
||||||
|
APP_CLEAN=$(echo "$APP" | sed 's/-mobile-app$//')
|
||||||
|
|
||||||
|
BRANCH_NAME="hotfix/krow-withus-${APP_CLEAN}-mobile-v${VERSION}"
|
||||||
echo "branch_name=${BRANCH_NAME}" >> $GITHUB_OUTPUT
|
echo "branch_name=${BRANCH_NAME}" >> $GITHUB_OUTPUT
|
||||||
echo "🌿 Branch to create: $BRANCH_NAME"
|
echo "🌿 Branch to create: $BRANCH_NAME"
|
||||||
|
|
||||||
@@ -115,7 +118,7 @@ jobs:
|
|||||||
APP="${{ github.event.inputs.app }}"
|
APP="${{ github.event.inputs.app }}"
|
||||||
HOTFIX_VERSION="${{ steps.hotfix_version.outputs.hotfix_version }}"
|
HOTFIX_VERSION="${{ steps.hotfix_version.outputs.hotfix_version }}"
|
||||||
|
|
||||||
if [ "$APP" = "worker" ]; then
|
if [ "$APP" = "worker-mobile-app" ]; then
|
||||||
PUBSPEC_PATH="apps/mobile/apps/staff/pubspec.yaml"
|
PUBSPEC_PATH="apps/mobile/apps/staff/pubspec.yaml"
|
||||||
CHANGELOG_PATH="apps/mobile/apps/staff/CHANGELOG.md"
|
CHANGELOG_PATH="apps/mobile/apps/staff/CHANGELOG.md"
|
||||||
APP_NAME="Staff Product"
|
APP_NAME="Staff Product"
|
||||||
@@ -148,7 +151,7 @@ jobs:
|
|||||||
HOTFIX_VERSION="${{ steps.hotfix_version.outputs.hotfix_version }}"
|
HOTFIX_VERSION="${{ steps.hotfix_version.outputs.hotfix_version }}"
|
||||||
ISSUE="${{ github.event.inputs.issue_description }}"
|
ISSUE="${{ github.event.inputs.issue_description }}"
|
||||||
|
|
||||||
if [ "$APP" = "worker" ]; then
|
if [ "$APP" = "worker-mobile-app" ]; then
|
||||||
CHANGELOG_PATH="apps/mobile/apps/staff/CHANGELOG.md"
|
CHANGELOG_PATH="apps/mobile/apps/staff/CHANGELOG.md"
|
||||||
APP_NAME="Staff Product"
|
APP_NAME="Staff Product"
|
||||||
else
|
else
|
||||||
@@ -215,7 +218,10 @@ From tag: ${{ github.event.inputs.tag }}"
|
|||||||
ISSUE="${{ github.event.inputs.issue_description }}"
|
ISSUE="${{ github.event.inputs.issue_description }}"
|
||||||
APP="${{ github.event.inputs.app }}"
|
APP="${{ github.event.inputs.app }}"
|
||||||
|
|
||||||
if [ "$APP" = "worker" ]; then
|
# Strip -mobile-app suffix for cleaner tag names
|
||||||
|
APP_CLEAN=$(echo "$APP" | sed 's/-mobile-app$//')
|
||||||
|
|
||||||
|
if [ "$APP" = "worker-mobile-app" ]; then
|
||||||
APP_DISPLAY="Worker Product"
|
APP_DISPLAY="Worker Product"
|
||||||
else
|
else
|
||||||
APP_DISPLAY="Client Product"
|
APP_DISPLAY="Client Product"
|
||||||
@@ -264,8 +270,8 @@ git push origin $BRANCH
|
|||||||
# Tag and release
|
# Tag and release
|
||||||
git checkout main
|
git checkout main
|
||||||
git pull origin main
|
git pull origin main
|
||||||
git tag -a krow-withus-${APP}-mobile/prod-v${HOTFIX_VERSION} -m \"HOTFIX: ${ISSUE}\"
|
git tag -a krow-withus-${APP_CLEAN}-mobile/prod-v${HOTFIX_VERSION} -m \"HOTFIX: ${ISSUE}\"
|
||||||
git push origin krow-withus-${APP}-mobile/prod-v${HOTFIX_VERSION}
|
git push origin krow-withus-${APP_CLEAN}-mobile/prod-v${HOTFIX_VERSION}
|
||||||
\`\`\`
|
\`\`\`
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -285,6 +291,9 @@ git push origin krow-withus-${APP}-mobile/prod-v${HOTFIX_VERSION}
|
|||||||
|
|
||||||
- name: 📊 Hotfix Summary
|
- name: 📊 Hotfix Summary
|
||||||
run: |
|
run: |
|
||||||
|
# Strip -mobile-app suffix for cleaner tag names
|
||||||
|
APP_CLEAN=$(echo "${{ github.event.inputs.app }}" | sed 's/-mobile-app$//')
|
||||||
|
|
||||||
echo "## 🚨 Hotfix Branch Created" >> $GITHUB_STEP_SUMMARY
|
echo "## 🚨 Hotfix Branch Created" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
echo "" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "**App:** ${{ github.event.inputs.app }}" >> $GITHUB_STEP_SUMMARY
|
echo "**App:** ${{ github.event.inputs.app }}" >> $GITHUB_STEP_SUMMARY
|
||||||
@@ -312,8 +321,8 @@ git push origin krow-withus-${APP}-mobile/prod-v${HOTFIX_VERSION}
|
|||||||
echo " \`\`\`bash" >> $GITHUB_STEP_SUMMARY
|
echo " \`\`\`bash" >> $GITHUB_STEP_SUMMARY
|
||||||
echo " git checkout main" >> $GITHUB_STEP_SUMMARY
|
echo " git checkout main" >> $GITHUB_STEP_SUMMARY
|
||||||
echo " git pull origin main" >> $GITHUB_STEP_SUMMARY
|
echo " git pull origin main" >> $GITHUB_STEP_SUMMARY
|
||||||
echo " git tag -a krow-withus-${{ github.event.inputs.app }}-mobile/prod-v${{ steps.hotfix_version.outputs.hotfix_version }} -m \"HOTFIX: ${{ github.event.inputs.issue_description }}\"" >> $GITHUB_STEP_SUMMARY
|
echo " git tag -a krow-withus-${APP_CLEAN}-mobile/prod-v${{ steps.hotfix_version.outputs.hotfix_version }} -m \"HOTFIX: ${{ github.event.inputs.issue_description }}\"" >> $GITHUB_STEP_SUMMARY
|
||||||
echo " git push origin krow-withus-${{ github.event.inputs.app }}-mobile/prod-v${{ steps.hotfix_version.outputs.hotfix_version }}" >> $GITHUB_STEP_SUMMARY
|
echo " git push origin krow-withus-${APP_CLEAN}-mobile/prod-v${{ steps.hotfix_version.outputs.hotfix_version }}" >> $GITHUB_STEP_SUMMARY
|
||||||
echo " \`\`\`" >> $GITHUB_STEP_SUMMARY
|
echo " \`\`\`" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
echo "" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
|
|||||||
6
.github/workflows/product-release.yml
vendored
6
.github/workflows/product-release.yml
vendored
@@ -8,8 +8,8 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
- worker
|
- worker-mobile-app
|
||||||
- client
|
- client-mobile-app
|
||||||
environment:
|
environment:
|
||||||
description: '🌍 Environment'
|
description: '🌍 Environment'
|
||||||
required: true
|
required: true
|
||||||
@@ -111,7 +111,7 @@ jobs:
|
|||||||
VERSION="${{ steps.version.outputs.version }}"
|
VERSION="${{ steps.version.outputs.version }}"
|
||||||
|
|
||||||
# Generate release title
|
# Generate release title
|
||||||
if [ "$APP" = "worker" ]; then
|
if [ "$APP" = "worker-mobile-app" ]; then
|
||||||
APP_DISPLAY="Worker Mobile Application"
|
APP_DISPLAY="Worker Mobile Application"
|
||||||
else
|
else
|
||||||
APP_DISPLAY="Client Mobile Application"
|
APP_DISPLAY="Client Mobile Application"
|
||||||
|
|||||||
Reference in New Issue
Block a user