Skip to content

Commit 4f620e1

Browse files
committed
refactor: make targets
1 parent 91b3840 commit 4f620e1

File tree

6 files changed

+27
-14
lines changed

6 files changed

+27
-14
lines changed

.github/workflows/build-android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
run: make -C backend android
5252

5353
- name: Install Node dependencies
54-
run: make -C mobile-app install
54+
run: make -C mobile-app node-install
5555

5656
- name: Setup JDK 17
5757
uses: actions/setup-java@v4

.github/workflows/build-ios.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
run: make -C backend ios
5252

5353
- name: Install Node dependencies
54-
run: make -C mobile-app install
54+
run: make -C mobile-app node-install
5555

5656
- name: Setup Ruby
5757
uses: ruby/setup-ruby@v1

.github/workflows/nix.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,14 @@ jobs:
5050
with:
5151
nix_path: nixpkgs=channel:nixos-unstable
5252

53-
- name: Build iOS inside Nix shell
54-
run: nix develop --command bash -c 'make setup && make ios'
53+
- name: Setup and install dependencies
54+
run: nix develop --command bash -c 'make setup && make -C mobile-app pod-install'
55+
56+
- name: Build Go backend for iOS
57+
run: nix develop --command bash -c 'make -C backend ios'
58+
59+
- name: Build iOS Simulator App
60+
run: nix develop --command bash -c 'make -C mobile-app build-ios'
5561

5662
- name: Upload Simulator Build
5763
uses: actions/upload-artifact@v4

.github/workflows/test-template.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
run: make -C test-app/backend ios
6060

6161
- name: Install Node dependencies
62-
run: make -C test-app/mobile-app install
62+
run: make -C test-app/mobile-app node-install
6363
env:
6464
YARN_ENABLE_HARDENED_MODE: 0
6565
YARN_ENABLE_IMMUTABLE_INSTALLS: false
@@ -130,7 +130,7 @@ jobs:
130130
run: make -C test-app/backend android
131131

132132
- name: Install Node dependencies
133-
run: make -C test-app/mobile-app install
133+
run: make -C test-app/mobile-app node-install
134134
env:
135135
YARN_ENABLE_HARDENED_MODE: 0
136136
YARN_ENABLE_IMMUTABLE_INSTALLS: false

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
setup:
44
@$(MAKE) -C backend setup
5-
@$(MAKE) -C mobile-app install
5+
@$(MAKE) -C mobile-app node-install
6+
@if [ "$$(uname)" = "Darwin" ]; then $(MAKE) -C mobile-app pod-install; fi
67

78
ios:
89
@$(MAKE) -C backend ios

mobile-app/Makefile

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ XCODE_WORKSPACE = ios/$(IOS_PROJECT).xcworkspace
88
XCODE_SCHEME = $(IOS_PROJECT)
99
XCODE_DERIVEDDATA = ios/build
1010

11-
.PHONY: install pod-install build-ios build-android run-ios run-android clean-ios clean-android clean help
11+
.PHONY: node-install pod-install ios build-ios android build-android run-ios run-android clean-ios clean-android clean help
1212

13-
install:
13+
node-install:
1414
@echo "Installing Node dependencies..."
1515
@$(YARN) install
1616
@echo "✓ Node dependencies installed"
@@ -20,7 +20,9 @@ pod-install:
2020
@cd ios && pod install
2121
@echo "✓ CocoaPods installed"
2222

23-
build-ios: install pod-install
23+
ios: node-install pod-install build-ios
24+
25+
build-ios:
2426
@echo "Building iOS Simulator app..."
2527
@set -o pipefail && xcodebuild -workspace $(XCODE_WORKSPACE) \
2628
-scheme $(XCODE_SCHEME) \
@@ -34,7 +36,9 @@ build-ios: install pod-install
3436
$(if $(shell command -v xcbeautify 2>/dev/null),| xcbeautify,)
3537
@echo "✓ iOS app built at $(XCODE_DERIVEDDATA)/Build/Products/Release-iphonesimulator/$(IOS_PROJECT).app"
3638

37-
build-android: install
39+
android: node-install build-android
40+
41+
build-android:
3842
@echo "Building Android Release APK..."
3943
@chmod +x $(GRADLEW)
4044
@cd android && ./gradlew assembleRelease --no-daemon
@@ -60,10 +64,12 @@ clean: clean-ios clean-android
6064

6165
help:
6266
@echo "Available targets:"
63-
@echo " make install - Install Node dependencies"
67+
@echo " make node-install - Install Node dependencies"
6468
@echo " make pod-install - Install CocoaPods dependencies"
65-
@echo " make build-ios - Build iOS Simulator app"
66-
@echo " make build-android - Build Android Release APK"
69+
@echo " make ios - Install deps + build iOS Simulator app"
70+
@echo " make build-ios - Build iOS Simulator app (deps must be installed)"
71+
@echo " make android - Install deps + build Android Release APK"
72+
@echo " make build-android - Build Android Release APK (deps must be installed)"
6773
@echo " make run-ios - Start iOS dev build via Expo"
6874
@echo " make run-android - Start Android dev build via Expo"
6975
@echo " make clean-ios - Clean iOS build artifacts"

0 commit comments

Comments
 (0)