Skip to content

Commit c623c58

Browse files
committed
build: auto configure with make init args
1 parent 8795621 commit c623c58

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

.github/workflows/ios.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ jobs:
2323
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
2424
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
2525
api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}
26-
- run: make init
26+
- run: PRODUCT_NAME=${{ secrets.APPSTORE_PRODUCT_NAME }} DEVELOPMENT_TEAM=${{ secrets.APPSTORE_DEVELOPMENT_TEAM }} PRODUCT_BUNDLE_IDENTIFIER=${{ secrets.APPSTORE_BUNDLE_ID }} make init
2727
- run: make heaps-world
2828
- run: make build
2929
- uses: actions/upload-artifact@v2
3030
with:
31-
name: HelloHeaps.app
32-
path: build/Release-iphoneos/HelloHeaps.app
31+
name: ${{ secrets.APPSTORE_PRODUCT_NAME}}.app
32+
path: build/Release-iphoneos/${{ secrets.APPSTORE_PRODUCT_NAME}}.app
3333
# need app-store provisioning profile
3434
# - uses: Apple-Actions/upload-testflight-build@master
3535
# with:

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
all: build install
44

55
init:
6-
git update-index --assume-unchanged Configuration/Config.xcconfig
7-
npm install -g ios-deploy
8-
brew install haxe
6+
brew install haxe gnu-sed
97
brew bundle install --file deps/hashlink/Brewfile --no-lock
108
make -C deps/hashlink
119
make install -C deps/hashlink
1210
haxelib setup /usr/local/lib/haxe/lib
11+
npm install -g ios-deploy
12+
gsed -i "s/PRODUCT_NAME=.*/PRODUCT_NAME=$(PRODUCT_NAME)/" -i Configuration/Config.xcconfig
13+
gsed -i "s/DEVELOPMENT_TEAM=.*/DEVELOPMENT_TEAM=$(DEVELOPMENT_TEAM)/" Configuration/Config.xcconfig
14+
gsed -i "s/PRODUCT_BUNDLE_IDENTIFIER=.*/PRODUCT_BUNDLE_IDENTIFIER=$(PRODUCT_BUNDLE_IDENTIFIER)/" Configuration/Config.xcconfig
15+
git update-index --assume-unchanged Configuration/Config.xcconfig
1316

1417
build:
1518
xcodebuild -project App.xcodeproj -target App build

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Forked from https://github.com/thejustinwalsh/heaps-ios
88
```sh
99
git clone https://github.com/qkdreyer/heaps-ios
1010
cd heaps-ios
11-
make init
11+
PRODUCT_NAME=HeapsApp DEVELOPMENT_TEAM=1234567890 PRODUCT_BUNDLE_IDENTIFIER=io.heaps.app make init
1212
```
1313

1414
## Usage
@@ -17,7 +17,3 @@ make init
1717
make heaps-world
1818
make # make build & make install
1919
```
20-
21-
## Configure
22-
23-
- Edit `Configuration/Config.xcconfig`

0 commit comments

Comments
 (0)