Skip to content

Commit 5aa4d55

Browse files
Add ipa-no-assets in build.sh
With this argument it builds the app and then removes all copyrighted materials. This is what should be used to publish the app on GitHub.
1 parent cb3f9d0 commit 5aa4d55

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

build.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/bin/sh
22

3+
###
4+
### Build an Xcode project.
5+
### This script exprects that you've already injected the original files.
6+
###
7+
38
# Main build command
49
xcodebuild clean build \
510
-configuration Release \
@@ -13,14 +18,25 @@ if ! [ $? = 0 ]; then
1318
fi;
1419

1520
# Compress the app into .ipa file if the "ipa" argument is passed
16-
if [ "$1" == "ipa" ]; then
21+
if [ "$1" == "ipa" ] || [ "$1" == "ipa-no-assets" ]; then
1722
cd ./build
1823
if [ -f "./iloveusomuch.ipa" ]; then
1924
rm ./iloveusomuch.ipa
2025
fi
2126
mkdir -p ./Payload/iloveusomuch.app
2227
mv ./iloveusomuch.app/* ./Payload/iloveusomuch.app
2328
rm -R ./iloveusomuch.app
29+
30+
# Remove copyrighted assets if the first argument is "ipa-no-assets"
31+
# This is used for publishing on GitHub
32+
if [ "$1" == "ipa-no-assets" ]; then
33+
rm ./Payload/iloveusomuch.app/AppIcon.png \
34+
./Payload/iloveusomuch.app/loader.png \
35+
./Payload/iloveusomuch.app/background.png \
36+
./Payload/iloveusomuch.app/Loader.m4v \
37+
./Payload/iloveusomuch.app/Videos.m4v
38+
fi
39+
2440
zip -r iloveusomuch ./Payload
2541
mv ./iloveusomuch.zip ./iloveusomuch.ipa
2642
rm -R ./Payload

0 commit comments

Comments
 (0)