on master help sign in
Merge pull request #404 from obsidiansystems/km-mobile-development-configs

Use development configs for default (non-deployed) mobile builds

commitf976bb4ec162d753f445d17b5f5c8b7be2352b57 authorAli Abrar <aliabrar@gmail.com> dateFri 5 Apr 2019, 11:34 (8 years ago) parentf543817e5e8c6d
2 files changed+9−9
default.nix+7−7 lib/command/src/Obelisk/Command/Deploy.hs+2−2
default.nix+7−7
@@ -299,21 +299,21 @@ in rec {
299299 injectableConfig = builtins.filterSource (path: _:
300300 !(lib.lists.any (x: hasPrefix (toString base + "/" + toString x) (toString path)) privateConfigDirs)
301301 );
302− __android = configPath: {
302+ __androidWithConfig = configPath: {
303303 ${if android == null then null else frontendName} = {
304304 executableName = "frontend";
305305 ${if builtins.pathExists staticFiles then "assets" else null} =
306306 nixpkgs.obeliskExecutableConfig.platforms.android.inject
307− (if configPath == null then null else injectableConfig configPath)
307+ (injectableConfig configPath)
308308 processedStatic.symlinked;
309309 } // android;
310310 };
311− __ios = configPath: {
311+ __iosWithConfig = configPath: {
312312 ${if ios == null then null else frontendName} = {
313313 executableName = "frontend";
314314 ${if builtins.pathExists staticFiles then "staticSrc" else null} =
315315 nixpkgs.obeliskExecutableConfig.platforms.ios.inject
316− (if configPath == null then null else injectableConfig configPath)
316+ (injectableConfig configPath)
317317 processedStatic.symlinked;
318318 } // ios;
319319 };
@@ -336,9 +336,9 @@ in rec {
336336 commonName
337337 ];
338338 };
339− android = __android null;
340− ios = __ios null;
341− passthru = { inherit android ios packages overrides tools shellToolOverrides withHoogle staticFiles staticFilesImpure __closureCompilerOptimizationLevel processedStatic __ios __android; };
339+ android = __androidWithConfig (base + "/config");
340+ ios = __iosWithConfig (base + "/config");
341+ passthru = { inherit android ios packages overrides tools shellToolOverrides withHoogle staticFiles staticFilesImpure __closureCompilerOptimizationLevel processedStatic __iosWithConfig __androidWithConfig; };
342342 };
343343 in mkProject (projectDefinition args));
344344 serverOn = sys: version: serverExe
lib/command/src/Obelisk/Command/Deploy.hs+2−2
@@ -234,7 +234,7 @@ deployMobile platform mobileArgs = withProjectRoot "." $ \root -> do
234234 [ "with (import ", srcDir, " {});"
235235 , "android.frontend.override (drv: { "
236236 , "releaseKey = (if builtins.isNull drv.releaseKey then {} else drv.releaseKey) // " <> releaseKey <> "; "
237− , "staticSrc = (passthru.__android ", configDir, ").frontend.staticSrc;"
237+ , "staticSrc = (passthru.__androidWithConfig ", configDir, ").frontend.staticSrc;"
238238 , "})"
239239 ]
240240 return $ Target
@@ -245,7 +245,7 @@ deployMobile platform mobileArgs = withProjectRoot "." $ \root -> do
245245 IOS -> do
246246 let expr = mconcat
247247 [ "with (import ", srcDir, " {});"
248− , "ios.frontend.override (_: { staticSrc = (passthru.__ios ", configDir, ").frontend.staticSrc; })"
248+ , "ios.frontend.override (_: { staticSrc = (passthru.__iosWithConfig ", configDir, ").frontend.staticSrc; })"
249249 ]
250250 return $ Target
251251 { _target_path = Nothing