refactor(ci): replace mobile-specific terms with generic product terminology
🔄 Updated workflows and scripts to use product-agnostic naming: Workflow Changes: - 📱 Mobile Release → 📦 Product Release - 🚨 Mobile Hotfix → 🚨 Product Hotfix - Mobile App → Product (in descriptions) - "mobile app" → "product" (in messages and tags) - "pubspec.yaml" → "version file" (in user-facing text) Display Names: - Worker Mobile → Worker Product - Client Mobile → Client Product - Staff Mobile App → Staff Product (Worker) - Client Mobile App → Client Product Benefits: ✅ Makes workflows extensible for other product types ✅ Consistent terminology across all automation ✅ Easier to add web, backend, or other products later ✅ Keeps implementation details (paths, scripts) unchanged ✅ Maintains backward compatibility with existing tags Note: File paths remain unchanged (apps/mobile/...) as they are implementation-specific
This commit is contained in:
4
.github/scripts/create-release-summary.sh
vendored
4
.github/scripts/create-release-summary.sh
vendored
@@ -17,10 +17,10 @@ fi
|
|||||||
|
|
||||||
# Determine display names
|
# Determine display names
|
||||||
if [ "$APP" = "worker" ]; then
|
if [ "$APP" = "worker" ]; then
|
||||||
APP_DISPLAY="Worker Mobile"
|
APP_DISPLAY="Worker Product"
|
||||||
APP_EMOJI="👷"
|
APP_EMOJI="👷"
|
||||||
else
|
else
|
||||||
APP_DISPLAY="Client Mobile"
|
APP_DISPLAY="Client Product"
|
||||||
APP_EMOJI="💼"
|
APP_EMOJI="💼"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
4
.github/scripts/extract-release-notes.sh
vendored
4
.github/scripts/extract-release-notes.sh
vendored
@@ -19,10 +19,10 @@ fi
|
|||||||
# Determine CHANGELOG path and app name
|
# Determine CHANGELOG path and app name
|
||||||
if [ "$APP" = "worker" ]; then
|
if [ "$APP" = "worker" ]; then
|
||||||
CHANGELOG_PATH="apps/mobile/apps/staff/CHANGELOG.md"
|
CHANGELOG_PATH="apps/mobile/apps/staff/CHANGELOG.md"
|
||||||
APP_NAME="Staff Mobile App (Worker)"
|
APP_NAME="Staff Product (Worker)"
|
||||||
else
|
else
|
||||||
CHANGELOG_PATH="apps/mobile/apps/client/CHANGELOG.md"
|
CHANGELOG_PATH="apps/mobile/apps/client/CHANGELOG.md"
|
||||||
APP_NAME="Client Mobile App"
|
APP_NAME="Client Product"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Try to extract release notes for this version
|
# Try to extract release notes for this version
|
||||||
|
|||||||
6
.github/scripts/extract-version.sh
vendored
6
.github/scripts/extract-version.sh
vendored
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Extract version from pubspec.yaml for mobile apps
|
# Extract version from version file for products
|
||||||
# Usage: ./extract-version.sh <app>
|
# Usage: ./extract-version.sh <app>
|
||||||
# app: worker or client
|
# app: worker or client
|
||||||
|
|
||||||
@@ -15,10 +15,10 @@ fi
|
|||||||
# Determine pubspec path
|
# Determine pubspec path
|
||||||
if [ "$APP" = "worker" ]; then
|
if [ "$APP" = "worker" ]; then
|
||||||
PUBSPEC_PATH="apps/mobile/apps/staff/pubspec.yaml"
|
PUBSPEC_PATH="apps/mobile/apps/staff/pubspec.yaml"
|
||||||
APP_NAME="Staff Mobile App (Worker)"
|
APP_NAME="Staff Product (Worker)"
|
||||||
else
|
else
|
||||||
PUBSPEC_PATH="apps/mobile/apps/client/pubspec.yaml"
|
PUBSPEC_PATH="apps/mobile/apps/client/pubspec.yaml"
|
||||||
APP_NAME="Client Mobile App"
|
APP_NAME="Client Product"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if pubspec exists
|
# Check if pubspec exists
|
||||||
|
|||||||
2
.github/scripts/generate-tag-name.sh
vendored
2
.github/scripts/generate-tag-name.sh
vendored
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Generate tag name for mobile release
|
# Generate tag name for product release
|
||||||
# Usage: ./generate-tag-name.sh <app> <environment> <version>
|
# Usage: ./generate-tag-name.sh <app> <environment> <version>
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|||||||
20
.github/workflows/mobile-hotfix.yml
vendored
20
.github/workflows/mobile-hotfix.yml
vendored
@@ -1,21 +1,21 @@
|
|||||||
name: Mobile Hotfix
|
name: 🚨 Product Hotfix
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
app:
|
app:
|
||||||
description: 'Mobile App'
|
description: '📦 Product'
|
||||||
required: true
|
required: true
|
||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
- worker
|
- worker
|
||||||
- client
|
- client
|
||||||
production_tag:
|
production_tag:
|
||||||
description: 'Current Production Tag (e.g., krow-withus-worker-mobile/prod-v0.1.0)'
|
description: '🏷️ Current Production Tag (e.g., krow-withus-worker-mobile/prod-v0.1.0)'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
issue_description:
|
issue_description:
|
||||||
description: 'Brief issue description'
|
description: '📝 Brief issue description'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
@@ -118,11 +118,11 @@ jobs:
|
|||||||
if [ "$APP" = "worker" ]; then
|
if [ "$APP" = "worker" ]; 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 Mobile App"
|
APP_NAME="Staff Product"
|
||||||
else
|
else
|
||||||
PUBSPEC_PATH="apps/mobile/apps/client/pubspec.yaml"
|
PUBSPEC_PATH="apps/mobile/apps/client/pubspec.yaml"
|
||||||
CHANGELOG_PATH="apps/mobile/apps/client/CHANGELOG.md"
|
CHANGELOG_PATH="apps/mobile/apps/client/CHANGELOG.md"
|
||||||
APP_NAME="Client Mobile App"
|
APP_NAME="Client Product"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update pubspec.yaml version
|
# Update pubspec.yaml version
|
||||||
@@ -150,10 +150,10 @@ jobs:
|
|||||||
|
|
||||||
if [ "$APP" = "worker" ]; then
|
if [ "$APP" = "worker" ]; then
|
||||||
CHANGELOG_PATH="apps/mobile/apps/staff/CHANGELOG.md"
|
CHANGELOG_PATH="apps/mobile/apps/staff/CHANGELOG.md"
|
||||||
APP_NAME="Staff Mobile App"
|
APP_NAME="Staff Product"
|
||||||
else
|
else
|
||||||
CHANGELOG_PATH="apps/mobile/apps/client/CHANGELOG.md"
|
CHANGELOG_PATH="apps/mobile/apps/client/CHANGELOG.md"
|
||||||
APP_NAME="Client Mobile App"
|
APP_NAME="Client Product"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$CHANGELOG_PATH" ]; then
|
if [ -f "$CHANGELOG_PATH" ]; then
|
||||||
@@ -216,9 +216,9 @@ From production tag: ${{ github.event.inputs.production_tag }}"
|
|||||||
APP="${{ github.event.inputs.app }}"
|
APP="${{ github.event.inputs.app }}"
|
||||||
|
|
||||||
if [ "$APP" = "worker" ]; then
|
if [ "$APP" = "worker" ]; then
|
||||||
APP_DISPLAY="Worker Mobile"
|
APP_DISPLAY="Worker Product"
|
||||||
else
|
else
|
||||||
APP_DISPLAY="Client Mobile"
|
APP_DISPLAY="Client Product"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PR_TITLE="🚨 HOTFIX: ${APP_DISPLAY} v${HOTFIX_VERSION} - ${ISSUE}"
|
PR_TITLE="🚨 HOTFIX: ${APP_DISPLAY} v${HOTFIX_VERSION} - ${ISSUE}"
|
||||||
|
|||||||
16
.github/workflows/mobile-release.yml
vendored
16
.github/workflows/mobile-release.yml
vendored
@@ -1,10 +1,10 @@
|
|||||||
name: 📱 Mobile Release
|
name: <EFBFBD> Product Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
app:
|
app:
|
||||||
description: '📱 Mobile App'
|
description: '📦 Product'
|
||||||
required: true
|
required: true
|
||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
@@ -31,7 +31,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate-and-create-release:
|
validate-and-create-release:
|
||||||
name: 🚀 Create Mobile Release
|
name: 🚀 Create Product Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -47,7 +47,7 @@ jobs:
|
|||||||
chmod +x .github/scripts/*.sh
|
chmod +x .github/scripts/*.sh
|
||||||
echo "✅ Scripts are now executable"
|
echo "✅ Scripts are now executable"
|
||||||
|
|
||||||
- name: 📖 Extract version from pubspec.yaml
|
- name: 📖 Extract version from version file
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(.github/scripts/extract-version.sh "${{ github.event.inputs.app }}")
|
VERSION=$(.github/scripts/extract-version.sh "${{ github.event.inputs.app }}")
|
||||||
@@ -69,7 +69,7 @@ jobs:
|
|||||||
TAG_NAME="${{ steps.tag.outputs.tag_name }}"
|
TAG_NAME="${{ steps.tag.outputs.tag_name }}"
|
||||||
if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then
|
if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then
|
||||||
echo "❌ Error: Tag $TAG_NAME already exists"
|
echo "❌ Error: Tag $TAG_NAME already exists"
|
||||||
echo "💡 Tip: Update the version in pubspec.yaml before creating a new release"
|
echo "💡 Tip: Update the version in the version file before creating a new release"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "✅ Tag does not exist, proceeding..."
|
echo "✅ Tag does not exist, proceeding..."
|
||||||
@@ -95,7 +95,7 @@ jobs:
|
|||||||
git config user.name "github-actions[bot]"
|
git config user.name "github-actions[bot]"
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
|
||||||
git tag -a "$TAG_NAME" -m "🚀 Release ${APP} mobile app ${VERSION} to ${ENV}"
|
git tag -a "$TAG_NAME" -m "🚀 Release ${APP} product ${VERSION} to ${ENV}"
|
||||||
git push origin "$TAG_NAME"
|
git push origin "$TAG_NAME"
|
||||||
|
|
||||||
echo "✅ Tag created and pushed: $TAG_NAME"
|
echo "✅ Tag created and pushed: $TAG_NAME"
|
||||||
@@ -112,9 +112,9 @@ jobs:
|
|||||||
|
|
||||||
# Generate release title
|
# Generate release title
|
||||||
if [ "$APP" = "worker" ]; then
|
if [ "$APP" = "worker" ]; then
|
||||||
APP_DISPLAY="Worker Mobile"
|
APP_DISPLAY="Worker Product"
|
||||||
else
|
else
|
||||||
APP_DISPLAY="Client Mobile"
|
APP_DISPLAY="Client Product"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ENV_UPPER=$(echo "$ENV" | tr '[:lower:]' '[:upper:]')
|
ENV_UPPER=$(echo "$ENV" | tr '[:lower:]' '[:upper:]')
|
||||||
|
|||||||
Reference in New Issue
Block a user