Skip to content

Commit 16146df

Browse files
committed
Refactor release scripts to use shared config
After renaming the app from "CF Cache Status" to "Cache Status", the release scripts broke because they had the app name hardcoded in multiple places. Changes: - Add scripts/config.sh with APP_NAME, PROJECT, SCHEME, BUILD_DIR - All release scripts now source config.sh for shared variables - `just release` no longer waits for notarization (can take days) - Prints next steps instead: status, staple, dmg This makes future app name changes a single-line edit.
1 parent abd9193 commit 16146df

File tree

8 files changed

+29
-19
lines changed

8 files changed

+29
-19
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
### Changed
8+
- Release scripts now use shared `config.sh` for app name and paths
9+
- `just release` no longer waits for notarization (async workflow)
10+
711
## [v0.0.8] - 2026-01-07
812

913
### Added

Justfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,17 @@ wait id="":
7272
staple version="":
7373
./scripts/staple.sh {{version}}
7474

75-
# Full release pipeline: archive, submit, wait, staple
75+
# Release pipeline: archive and submit for notarization
7676
release tag="":
7777
#!/usr/bin/env bash
7878
set -e
7979
just archive {{tag}}
8080
just submit
81-
just wait
82-
just staple
81+
echo ""
82+
echo "Submitted for notarization. Next steps:"
83+
echo " just status # Check notarization status"
84+
echo " just staple # Staple after approval"
85+
echo " just dmg # Create DMG installer"
8386

8487
# Show notarization history
8588
history:

scripts/archive-appstore.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ set -e
44
# Build and archive for Mac App Store distribution
55
# Usage: ./scripts/archive-appstore.sh [tag]
66

7-
PROJECT="CF Cache Status/CF Cache Status.xcodeproj"
8-
SCHEME="CF Cache Status"
9-
BUILD_DIR="${BUILD_DIR:-build}"
7+
source "$(dirname "$0")/config.sh"
108

119
tag="${1:-}"
1210
original_ref=""

scripts/archive.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ set -e
55
# Usage: ./scripts/archive.sh [tag]
66
# If a tag is provided, checks out that tag first, builds, then returns
77

8-
PROJECT="CF Cache Status/CF Cache Status.xcodeproj"
9-
SCHEME="CF Cache Status"
10-
BUILD_DIR="${BUILD_DIR:-build}"
8+
source "$(dirname "$0")/config.sh"
119

1210
tag="${1:-}"
1311
original_ref=""
@@ -74,4 +72,4 @@ xcodebuild -exportArchive \
7472

7573
echo "$ver" > "$BUILD_DIR/.current_version"
7674

77-
echo "✓ Archive complete: $export_path/CF Cache Status.app"
75+
echo "✓ Archive complete: $export_path/$APP_NAME.app"

scripts/config.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
# Shared configuration for release scripts
3+
4+
APP_NAME="Cache Status"
5+
PROJECT="CF Cache Status/CF Cache Status.xcodeproj"
6+
SCHEME="CF Cache Status"
7+
BUILD_DIR="${BUILD_DIR:-build}"

scripts/create-dmg.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
# Create DMG installer with drag-to-Applications window
55
# Usage: ./scripts/create-dmg.sh [version]
66

7-
BUILD_DIR="${BUILD_DIR:-build}"
7+
source "$(dirname "$0")/config.sh"
88

99
if [[ -n "$1" ]]; then
1010
ver="$1"
@@ -16,7 +16,7 @@ else
1616
fi
1717

1818
ver_dir="$BUILD_DIR/$ver"
19-
app_path="$ver_dir/export/CF Cache Status.app"
19+
app_path="$ver_dir/export/$APP_NAME.app"
2020
dmg_path="$ver_dir/CacheStatus-$ver.dmg"
2121

2222
if [[ ! -d "$app_path" ]]; then
@@ -46,15 +46,15 @@ BACKGROUND="$SCRIPT_DIR/../assets/dmg-background.png"
4646
# └──────────────────────────────────────────────┘
4747

4848
create-dmg \
49-
--volname "Cache Status" \
49+
--volname "$APP_NAME" \
5050
--volicon "$app_path/Contents/Resources/AppIcon.icns" \
5151
--background "$BACKGROUND" \
5252
--window-pos 200 120 \
5353
--window-size 600 400 \
5454
--icon-size 100 \
55-
--icon "CF Cache Status.app" 150 125 \
55+
--icon "$APP_NAME.app" 150 125 \
5656
--app-drop-link 450 125 \
57-
--hide-extension "CF Cache Status.app" \
57+
--hide-extension "$APP_NAME.app" \
5858
"$dmg_path" \
5959
"$app_path"
6060

scripts/staple.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
# Staple notarization ticket and create release zip
55
# Usage: ./scripts/staple.sh [version]
66

7-
BUILD_DIR="${BUILD_DIR:-build}"
7+
source "$(dirname "$0")/config.sh"
88

99
if [[ -n "$1" ]]; then
1010
ver="$1"
@@ -16,7 +16,7 @@ else
1616
fi
1717

1818
ver_dir="$BUILD_DIR/$ver"
19-
app_path="$ver_dir/export/CF Cache Status.app"
19+
app_path="$ver_dir/export/$APP_NAME.app"
2020
zip_path="$ver_dir/CacheStatus-$ver.zip"
2121

2222
if [[ ! -d "$app_path" ]]; then

scripts/submit.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
# Submit app for notarization
55
# Usage: ./scripts/submit.sh [version]
66

7-
BUILD_DIR="${BUILD_DIR:-build}"
7+
source "$(dirname "$0")/config.sh"
88

99
if [[ -n "$1" ]]; then
1010
ver="$1"
@@ -15,7 +15,7 @@ else
1515
fi
1616

1717
ver_dir="$BUILD_DIR/$ver"
18-
app_path="$ver_dir/export/CF Cache Status.app"
18+
app_path="$ver_dir/export/$APP_NAME.app"
1919
zip_path="$ver_dir/CacheStatus-$ver.zip"
2020

2121
if [[ ! -d "$app_path" ]]; then

0 commit comments

Comments
 (0)