Cleanup
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
This commit is contained in:
parent
f36efbc24b
commit
e220ecbb0a
|
@ -124,7 +124,7 @@ RCT_EXPORT_METHOD(initKeystore) {
|
||||||
^(void)
|
^(void)
|
||||||
{
|
{
|
||||||
NSString *res = StatusgoInitKeystore(keystoreDir.path);
|
NSString *res = StatusgoInitKeystore(keystoreDir.path);
|
||||||
NSLog(@"StopNode result %@", res);
|
NSLog(@"InitKeyStore result %@", res);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
let
|
let
|
||||||
shell = mkShell {
|
shell = mkShell {
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
if [ -z "$RCTSTATUS_FILEPATH" ]; then
|
if [ -z "$STATUS_GO_IOS_LIBDIR" ]; then
|
||||||
echo "RCTSTATUS_FILEPATH is not defined! Aborting."
|
echo "STATUS_GO_IOS_LIBDIR is not defined! Aborting."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -13,13 +13,13 @@ let
|
||||||
|
|
||||||
# Compare target folder with source to see if copying is required
|
# Compare target folder with source to see if copying is required
|
||||||
if [ -d "$RCTSTATUS_DIR/$targetBasename" ] && [ -d $STATUS_REACT_HOME/ios/Pods/ ] && \
|
if [ -d "$RCTSTATUS_DIR/$targetBasename" ] && [ -d $STATUS_REACT_HOME/ios/Pods/ ] && \
|
||||||
diff -q --no-dereference --recursive $RCTSTATUS_DIR/$targetBasename/ $RCTSTATUS_FILEPATH/ > /dev/null; then
|
diff -q --no-dereference --recursive $RCTSTATUS_DIR/$targetBasename/ $STATUS_GO_IOS_LIBDIR/ > /dev/null; then
|
||||||
echo "$RCTSTATUS_DIR/$targetBasename already in place"
|
echo "$RCTSTATUS_DIR/$targetBasename already in place"
|
||||||
else
|
else
|
||||||
sourceBasename="$(basename $RCTSTATUS_FILEPATH)"
|
sourceBasename="$(basename $STATUS_GO_IOS_LIBDIR)"
|
||||||
echo "Copying $sourceBasename from Nix store to $RCTSTATUS_DIR"
|
echo "Copying $sourceBasename from Nix store to $RCTSTATUS_DIR"
|
||||||
rm -rf "$RCTSTATUS_DIR/$targetBasename/"
|
rm -rf "$RCTSTATUS_DIR/$targetBasename/"
|
||||||
cp -a $RCTSTATUS_FILEPATH $RCTSTATUS_DIR
|
cp -a $STATUS_GO_IOS_LIBDIR $RCTSTATUS_DIR
|
||||||
chmod -R 755 "$RCTSTATUS_DIR/$targetBasename"
|
chmod -R 755 "$RCTSTATUS_DIR/$targetBasename"
|
||||||
if [ "$sourceBasename" != "$targetBasename" ]; then
|
if [ "$sourceBasename" != "$targetBasename" ]; then
|
||||||
mv "$RCTSTATUS_DIR/$sourceBasename" "$RCTSTATUS_DIR/$targetBasename"
|
mv "$RCTSTATUS_DIR/$sourceBasename" "$RCTSTATUS_DIR/$targetBasename"
|
||||||
|
|
|
@ -51,8 +51,13 @@ if [[ "$TARGET" =~ (linux|windows|darwin|macos) ]]; then
|
||||||
nix-shell ${shellArgs[@]} --run "scripts/prepare-for-desktop-platform.sh" || exit
|
nix-shell ${shellArgs[@]} --run "scripts/prepare-for-desktop-platform.sh" || exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
statusGoConfig=''
|
||||||
if [ -n "${STATUS_GO_SRC_OVERRIDE}" ]; then
|
if [ -n "${STATUS_GO_SRC_OVERRIDE}" ]; then
|
||||||
shellArgs+=("--arg config {status_go.src_override=\"${STATUS_GO_SRC_OVERRIDE}\";}")
|
statusGoConfig+="status_go.src_override=\"${STATUS_GO_SRC_OVERRIDE}\";"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$statusGoConfig" ]; then
|
||||||
|
shellArgs+=("--arg config {$statusGoConfig}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if _NIX_ATTR is specified we shouldn't use shell.nix, the path will be different
|
# if _NIX_ATTR is specified we shouldn't use shell.nix, the path will be different
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
# everything else we define in nix/ dir
|
# everything else we define in nix/ dir
|
||||||
targets = pkgs.callPackage ./targets.nix { };
|
targets = pkgs.callPackage ./targets.nix { inherit config; };
|
||||||
|
|
||||||
# for calling lein targets in CI or Makefile
|
# for calling lein targets in CI or Makefile
|
||||||
leiningen-sh = pkgs.mkShell {
|
leiningen-sh = pkgs.mkShell {
|
||||||
|
|
|
@ -131,7 +131,7 @@ let
|
||||||
inherit buildInputs;
|
inherit buildInputs;
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
# These variables are used by the iOS build preparation section in nix/mobile/ios/default.nix
|
# These variables are used by the iOS build preparation section in nix/mobile/ios/default.nix
|
||||||
export RCTSTATUS_FILEPATH=${status-go-packages.ios}/lib/Statusgo.framework
|
export STATUS_GO_IOS_LIBDIR=${status-go-packages.ios}/lib/Statusgo.framework
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,8 +6,13 @@ source "$_current_dir/lib/setup/path-support.sh"
|
||||||
|
|
||||||
source_lib "platform.sh"
|
source_lib "platform.sh"
|
||||||
|
|
||||||
|
statusGoConfig=''
|
||||||
|
if [ -n "${STATUS_GO_SRC_OVERRIDE}" ]; then
|
||||||
|
statusGoConfig+="status_go.src_override=\"${STATUS_GO_SRC_OVERRIDE}\";"
|
||||||
|
fi
|
||||||
|
|
||||||
nixOpts=(
|
nixOpts=(
|
||||||
"--arg config {status_go.src_override=\"${STATUS_GO_SRC_OVERRIDE}\";}"
|
"--arg config {${statusGoConfig}}"
|
||||||
"--arg env {BUILD_ENV=\"${BUILD_ENV}\";ANDROID_ABI_SPLIT=\"${ANDROID_ABI_SPLIT}\";ANDROID_ABI_INCLUDE=\"${ANDROID_ABI_INCLUDE}\";}"
|
"--arg env {BUILD_ENV=\"${BUILD_ENV}\";ANDROID_ABI_SPLIT=\"${ANDROID_ABI_SPLIT}\";ANDROID_ABI_INCLUDE=\"${ANDROID_ABI_INCLUDE}\";}"
|
||||||
"--argstr build-type ${BUILD_TYPE}"
|
"--argstr build-type ${BUILD_TYPE}"
|
||||||
"--argstr build-number ${BUILD_NUMBER}"
|
"--argstr build-number ${BUILD_NUMBER}"
|
||||||
|
|
Loading…
Reference in New Issue