diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e93f20a23061e4e983b11b760109fde35e72c92..6f0b8ef89d3865dfba9f3c5cea2f9ec863f6fdd1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,12 +12,14 @@ default: hlint: stage: lint script: - - nix-shell --run "hlint --version; hlint -j obelisk/frontend" + - cd obelisk + - nix-shell --run "hlint --version; hlint -j frontend" cabal-build-and-test: stage: build script: - - nix-shell --run "cd obelisk; cabal build frontend" + - cd obelisk + - nix-shell --run "cabal build frontend" build-debug-apk: stage: build @@ -49,13 +51,14 @@ build-unsigned-release-bundle: build-signed-release-apk: stage: build script: + - cd obelisk # Generate a throw-away key to exercise signing. - | nix-shell --command ' keytool \ -genkey \ -v \ - -keystore ./obelisk/android-ci.keystore \ + -keystore ./android-ci.keystore \ -alias ci \ -keyalg RSA \ -keysize 2048 \ @@ -66,10 +69,9 @@ build-signed-release-apk: ' # Get the right key configuration for this environment in place. - - cp ./obelisk/android-signing-key-ci.nix ./obelisk/android-signing-key.nix + - cp ./android-signing-key-ci.nix ./android-signing-key.nix # Do the build. - - cd obelisk - nix-build -A android.frontend.release -o result-android-release artifacts: paths: @@ -80,13 +82,14 @@ build-signed-release-apk: build-signed-release-bundle: stage: build script: + - cd obelisk # Generate a throw-away key to exercise signing. - | nix-shell --command ' keytool \ -genkey \ -v \ - -keystore ./obelisk/android-ci.keystore \ + -keystore ./android-ci.keystore \ -alias ci \ -keyalg RSA \ -keysize 2048 \ @@ -97,10 +100,9 @@ build-signed-release-bundle: ' # Get the right key configuration for this environment in place. - - cp ./obelisk/android-signing-key-ci.nix ./obelisk/android-signing-key.nix + - cp ./android-signing-key-ci.nix ./android-signing-key.nix # Do the build. - - cd obelisk - nix-build -A android.frontend.bundle -o result-android-bundle # To be sure we signed it, look inside it for a signature file. Note that diff --git a/README.md b/README.md index d94e17b7680b8d82675228031bee0e52029a88eb..e48782feb3719a7a2fc45792a75371a8afd8c0b5 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,6 @@ Build an Android debug apk and install it to an Android device connected via USB (with necessary permissions granted): ```sh -nix-shell cd obelisk nix-build -A android.frontend -o result-android-frontend ./result-android-frontend/bin/deploy @@ -33,7 +32,6 @@ nix-build -A android.frontend -o result-android-frontend Build an Android release apk: ```sh -nix-shell cd obelisk nix-build -A android.frontend.release -o result-android-release ./result-android-release/bin/deploy @@ -69,7 +67,6 @@ Note: Build an Android release Bundle (aab): ```sh -nix-shell cd obelisk nix-build -A android.frontend.bundle -o result-android-bundle ``` @@ -83,8 +80,8 @@ You can run the Obelisk application locally, without a phone. To do so: ```sh -nix-shell cd obelisk +nix-shell ob run ``` diff --git a/.envrc b/obelisk/.envrc similarity index 100% rename from .envrc rename to obelisk/.envrc diff --git a/shell.nix b/obelisk/shell.nix similarity index 79% rename from shell.nix rename to obelisk/shell.nix index 51785aee7fb0604a6249e43426b709cc91310e93..4f34f5a8815931c5692299288ad8b5276aa68a72 100644 --- a/shell.nix +++ b/obelisk/shell.nix @@ -1,3 +1,3 @@ # Use one of Obelisk/Reflex's shells. This at least gets us a working ghcid # and haskell-language-server, extremely useful for development purposes. -(import ./obelisk { }).shells.ghc +(import ./default.nix { }).shells.ghc