Add `clean` makefile target to ensure build leftover state is removed. Part of #5563

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Pedro Pombeiro 2018-08-30 14:56:45 +02:00 committed by Jakub Sokołowski
parent 2a1468cfa9
commit 5ee1659b13
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
4 changed files with 12 additions and 6 deletions

View File

@ -26,6 +26,10 @@ HELP_FUN = \
# Main targets
clean: ##@prepare Remove all output folders
git clean -qdxf modules/react-native-status/ target/ desktop/modules desktop/node_modules
npm prune
setup: ##@prepare Install all the requirements for status-react
./scripts/setup
@ -33,7 +37,6 @@ prepare: ##@prepare Install dependencies and prepare workspace
scripts/prepare-for-platform.sh mobile
npm install
prepare-ios: prepare ##@prepare Install iOS specific dependencies
mvn -f modules/react-native-status/ios/RCTStatus dependency:unpack
cd ios && pod install && cd ..
@ -64,8 +67,7 @@ prod-build-ios:
lein prod-build-ios
full-prod-build: ##@build build prod for both Android and iOS
./scripts/bundle-status-go.sh ios
./scripts/bundle-status-go.sh android
./scripts/bundle-status-go.sh ios android
$(MAKE) prod-build
rm -r ./modules/react-native-status/ios/RCTStatus/Statusgo.framework/ 2> /dev/null || true
rm ./modules/react-native-status/android/libs/status-im/status-go/local/status-go-local.aar 2> /dev/null

View File

@ -22,10 +22,9 @@ external_fonts = [
def cleanupBuild() {
sh """
rm -rf \\
node_modules ${packageFolder} \\
desktop/modules desktop/node_modules
rm -rf ${packageFolder}
"""
sh 'make clean'
}
def cleanupAndDeps() {

View File

@ -34,6 +34,8 @@ def podUpdate() {
}
def prep(type = 'nightly') {
/* ensure that we start from a known state */
sh 'make clean'
/* select type of build */
switch (type) {
case 'nightly':

View File

@ -15,6 +15,9 @@ fi
set -euf
# Ensure we start with a clean state, so as to e.g., not reuse old native status-go bindings
make clean
for platform in "$@"; do
case $platform in
ios | android)