Commit Graph

247 Commits

Author SHA1 Message Date
Jakub Sokołowski 2493b8ad4b
ios: replace Diawi Fastlane plugin that disappered
For an unknown reason the original Diawi plugin for Fastlane has been
removed from GitHub and RubyGems pages and can no longer be used.

This replaces it with a Node.js script which does the same job.

I tried using `diawi` and `diawi-nodejs-uploader` but both had issues,
one of them being depending on far too many useless packages.

Resolves: https://github.com/status-im/status-mobile/issues/15951

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-05-24 10:55:38 +02:00
Jakub Sokołowski 78131c1028
ci: add Alchemy and Infura credentials in CI
Depends on: https://github.com/status-im/status-jenkins-lib/pull/64

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-05-10 12:57:04 +02:00
flexsurfer fa03e91080
Sanitize quo2 namespace (#15207) 2023-02-28 13:59:09 +01:00
flexsurfer 31b6e076be
new structure continue, move utils, move fx macro to re-frame utils n… (#14373)
* new structure continue, move utils, move fx macro to re-frame utils namespace
2022-11-16 09:09:25 +01:00
yqrashawn 3925de58b1
chore: lint against re-frame dispatch/subscribe in quo components (#14282) 2022-11-10 10:22:42 +08:00
Roman Volosovskyi c017c01c53
[#11335] Use Pokt network as an infura replacement 2022-10-19 17:00:17 +02:00
Jakub Sokołowski 0e3b645695
scripts/fdroid-pr.sh: fix version name log message
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-09-29 12:54:48 +02:00
Jakub Sokołowski c4da42b4d2
scripts/fdroid-pr.sh: fix typo in vars and directory
Doesn't affect functioning, but it's unsightly.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-09-20 20:23:47 +02:00
Jakub Sokołowski d97a7fb325
nix: drop KEYSTORE_PATH from extra-sandbox-paths
This is no longer necessary as we sign APKs in a separate step using the
`scripts/sign-android.sh` script, and this causes issues for F-Droid builds.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-09-20 12:11:47 +02:00
Jakub Sokołowski 337a4d7d1c
hooks: fix newline injection on MacOS
Because MacOS `sed` just needs newlines to be escaped differently.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-09-05 14:57:25 +02:00
Jakub Sokołowski 8fe5e5f73c
hooks: use AWK instead of jq for better portability
Some systems don't have jq installed, and using something like
`nix-shell` in the shebang would make this script noticeably slower.

We're not using `grep` because it lacks `-P` flag on MacOS.

Resolves: https://github.com/status-im/status-mobile/issues/13322

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-09-05 14:57:24 +02:00
Jakub Sokołowski 5df202753f
drop unused coveralls configuration and CI steps
Depends on: https://github.com/status-im/status-jenkins-lib/pull/45

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-08-26 21:37:59 +02:00
Jakub Sokołowski 95af16f6ae
generate-keystore: fix Permission denied error
MacOS permissions are stupid:
```
 > ls -l /dev/stderr
lr-xr-xr-x  1 root  wheel  0 Jun 20 20:45 /dev/stderr -> fd/2
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-08-10 02:21:13 +02:00
Jakub Sokołowski 5903cf73fb
nix: stop passing watchman socket to Nix builds
This passing of Watchman socket was implemented in order to avoid this:
```
Error: EMFILE: too many open files, watch
    at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:204:21)
Emitted 'error' event on NodeWatcher instance at:
    at NodeWatcher.checkedEmitError (/private/tmp/nix-build-status-mobile-build-nightly-android.drv-0/node_modules/sane/src/node_watcher.js:143:12)
    at FSWatcher.emit (node:events:527:28)
    at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:210:12) {
  errno: -24,
  syscall: 'watch',
  code: 'EMFILE',
  filename: null
}
```
Which is caused by `jest-haste-map` used by `metro` starting to watch
the filesystem for file changes, which is pointless when doing a
one-off build using Nix.

But by setting `CI=true` we can make `metro` not start this waching of
files in the first place, removing the need for use of Watchman entirely.

By entirely dropping use of Watchman we also fix the following issue:
```
[cli] unable to talk to your watchman on /tmp/tmp-status-mobile-ABC/jenkins-state/sock! (Permission denied)
```
Which happens on multi-user Nix installations becuase the user that the
Nix build is executed as is not the same as the user that starts
Watchman and creates the socket file.

Issue: https://github.com/status-im/status-mobile/issues/13783

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-08-10 02:21:12 +02:00
Jakub Sokołowski c27a74e378
nix: quote path uses to avoid issues with spaces
This is most important on MacOS, but in general is a good idea.

Resolves:
https://github.com/status-im/status-mobile/issues/13715

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-07-27 16:11:28 +02:00
Jakub Sokołowski 1f7fd17ff1
rename status-react to status-mobile
This way the name of the repo makes at least some sense and
matches the `status-desktop` repo naming.

Also updated `status-jenkins-lib` since it also contained
references to `status-react` repo and job names.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-07-17 14:46:16 +02:00
Jakub Sokołowski b3a74ad7a5
use 8 char commits SHAs for status-go diff link
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-06-02 13:24:10 +02:00
Jakub Sokołowski 7bf77efc87
add newline when creating status-go diff link
Otherwise Fugitive plugin in Vim complains about it.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-06-02 13:18:46 +02:00
Jakub Sokołowski acfa73ab43
nix: build unsigned Android APK, sign separately
This has several benefits:

* Less abuse of `extra-sandbox-paths` Nix option
* Less inputs to the Android release build derivation
* Easier for users to sign the build themselves
* Simplification of `scripts/release-android.sh`
* Preparation for building using Nix Flakes

The only two remaining credentials passed via `extra-sandbox-paths` is
the Infura and OpenSea API keys, and there is no way around that other
than passing them via Nix arguments, but that would cause them to end up
in `/nix/store` as part of `.drv` files.

I'm also renaming `release-fdroid` to `build-fdroid` to be consistent.

Depends on: https://github.com/status-im/status-jenkins-lib/pull/42

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-21 11:10:11 +02:00
andrey f39b688e89
google free and metrics free
Signed-off-by: andrey <motor4ik@gmail.com>
2022-05-19 07:22:23 +02:00
Jakub Sokołowski 91e85a28f9
scripts/update-status-go: support commit SHA1
In some rare cases we might want to supply an exact commit rather than a
branch name or a git tag.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-03-28 17:44:16 +02:00
Roman Volosovskyi aa72ac5747
[#13016] Pass opensea key from env
Signed-off-by: andrey <motor4ik@gmail.com>
2022-03-21 13:59:35 +01:00
Audrius Molis 1b9e139255
Fix sed command to work on mac
Signed-off-by: Audrius Molis <masta@dr.com>
2022-03-21 11:35:00 +02:00
andrey c69b640810
comment out go hook 2022-03-18 09:31:45 +01:00
Audrius Molis 1eb956d562
Add changelog from status-go on upgrade #13090
Signed-off-by: Audrius Molis <masta@dr.com>
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-03-07 12:46:49 +01:00
Parvesh Monu 36c7d8e4ca
Implementation of remote android notifications (#13028) 2022-02-14 17:27:33 +05:30
Jakub Sokołowski 179f1d26ae
nix: remove obsolete references to Nimbus sources
This used to be a project to integrate Nimbus with mobile, but it was abandoned.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-11-15 13:17:30 +01:00
Andrea Maria Piana 5c52854d11
fdroid: add script that automates submissions
This script fetches a specified APK and analyzes it for values like
version code or commit and then based on that creates a branchy and a
commit in `fdroiddata` repository that can be used to create a release PR.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-10-13 12:13:38 +02:00
Jakub Sokołowski 85348306ce
drop scripts/generate-pull-request-report.sh
People on HackerOne keep reporting this file as containing a secret token.

The reality is that this token is no longer usable since it was
published to a public repo, which would have caused it to be revoked
automatically though GitHub automation:
https://docs.github.com/en/code-security/secret-scanning/about-secret-scanning

Other than that I'm pretty sure nobody is using this script.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-09-21 20:04:39 +02:00
Jakub Sokołowski e2c18ea151
add commit hash to app metadata for Android and iOS
This will make identifying installed software easier.
It can also be used to generate F-Droid RPs more easily.

Depends on:
https://github.com/status-im/status-jenkins-lib/pull/35

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-09-21 11:48:45 +02:00
Jakub Sokołowski a76e4666de
update-status-go: does not need to depend on make shell
The dependency on `make shell` is confusing and unnecessary since
`update-status-go.sh` script only requires availability of the
`nix-prefetch-url` utility to check SHA256 of the `status-go` verison.

Use of `make shell` with this script can also cause issues when running
`make run-android` if already in the shell, which prevents spawning a
new one and effectively stops changes to `status-go-verison.json` file
taking effect.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-09-15 11:04:52 +02:00
Andrea Maria Piana 956bb813d4
Make cut release executable 2021-04-20 11:07:48 +02:00
Jakub Sokołowski 310a1ad5f1
drop scripts/tag-release.sh in favor of scripts/cut-release.sh
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-04-16 16:14:57 +02:00
Andrea Maria Piana a90d8a1439
Add release guide & script to cut release
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-04-16 16:12:37 +02:00
Jakub Sokołowski 8376fedb4b
make: add release-fdroid and fdroid-nix-dir targets
With these targets added we can simplify the format of the F-Droid YAML
metadata file which defines how to run `status-react` builds.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-03-02 12:38:34 +01:00
Roman Volosovskyi 767bd46bff
Allow non alphanumeric branch names in scripts/update-status-go.sh 2020-12-31 12:50:26 +02:00
Jakub Sokołowski 908b5f723c
nix: add support for INFURA_TOKEN var for Android build
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-10-08 17:55:24 +02:00
Jakub Sokołowski 085ae22be1
disable pipefail for update-status-go.sh
This caused a silent failure due to usage of grep matching.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-10-08 14:49:02 +02:00
Jakub Sokołowski bc12c90d2e
update-status-go: fix case where two matching refs exist
Before it was possible to break the format of `status-go-version.json`:
```
 > git ls-remote https://github.com/status-im/status-go v0.62.3.hotfix.3
59e6602405bfbcf8446d26aca9b8087e84529f8e    refs/heads/release/v0.62.3.hotfix.3
59e6602405bfbcf8446d26aca9b8087e84529f8e    refs/tags/v0.62.3.hotfix.3
```
Which would result in `commit-sha1` key being set to two commits insted of one.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-10-01 14:40:30 +02:00
Jakub Sokołowski 788d0d5cc5
add ANDROID_APK_SIGNED to make unsigned builds for F-Droid
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-29 10:12:38 +02:00
Jakub Sokołowski 0be5f5d8d0
nix: enable build-use-sandbox for Android
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-29 10:12:30 +02:00
Jakub Sokołowski 112132aa94
drop all desktop related files and references
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-08 10:26:51 +02:00
Jakub Sokołowski dbb4b52a70
nix: make secretsFile argument optional
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-22 16:33:56 +02:00
Jakub Sokołowski f2c96dcd3b
nix: add config defaults and temp keystore generation
Changes:
* Create `nix/config.nix` with `config` defaults
* Add `nix/tools/gradlePropParser.nix` for reading `gradle.properties`
* Add `nix/mobile/android/keystore.nix` for generating a keystore
* Load keystore generation in `nix/mobile/android/default.nix`
* Use generated keystore if it's not provided via `config`
* Add `-deststoretype pkcs12` in `scripts/generate-keystore.sh`
* Add `nix/lib/assertEnvVarSet.nix` for checking if env var is set

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-04 11:10:48 +02:00
Jakub Sokołowski 12e67ad6d2
nix: improve nix/scripts/node_modules.sh
Changes:
- MOAR functions so it's easier to follow
- Don't use /tmp, put the copied node_modules in repo root first
- Ignore more node_modules sub folders when checking for modifications
  - */unpacked_bin/clj-kondo
  - */scripts/.packager.env

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-02 16:26:19 +02:00
Jakub Sokołowski 2f65cedd2d
nix: replace grep and sed with AWK for parsing Gradle deps
The mess with regexes is hard to read and think about which is why it
had bugs with handling some Gradle formats.

It also lowers further the number of dependencies pulled from 785 to 744.

Changes:
- Added `gradle_parser.awk` script for getting dependencies from Gradle
- Changed the `deps.urls` file to contain full URLs to POMs
- Dropped the `deps.urls.old` part since `get_urls.sh` no longer exists
- Added `CLR` for learing line to `scripts/colors.sh`
- Wrote a new `nix/deps/gradle/README.md`
- Re-generated `nix/pkgs/go-maven-resolver/deps.nix`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-25 19:34:56 +02:00
Jakub Sokołowski a96b35996f
drop scripts/copy-translations.sh as useless
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 09:46:22 +02:00
Jakub Sokołowski 42fb40476c
nix: reafactoring of status-go builds
Changes:
- Fixed `nix/status-go/desktop` builds
- Dropped nimbus wrapper for `status-go` for now
- Split `status-go` builds into subfolders: `mobile`, `desktop`
- Fixed shells for desktop builds: `linux`,`macos`,`windows`
- Added `make status-go-*` targets for building them
- Moved source management to `nix/status-go/source.nix`
- Moved `nix/status-go/build.nix` into `nix/status-go/mobile`
- Moved `nix/desktop/cmake/qtkeychain` to `nix/pkgs/qtkeychain-src`
- Moved `nix/desktop/linux/linuxdeployqt` to `nix/pkgs`
- Moved `nix/desktop/linux/appimagekit` to `nix/pkgs`
- Dropped `nix/tools/mkShell.nix` since it did almost nothing
- Dropped `nix/desktop/cmake/snorenotify` since it's broken
- Moved setup from `nix/tools/mkShell.nix` to `nix/shells.nix`
- Simplified `nix/mobile/ios/status-go-shell.nix`
- Simplified `nix/status-go/default.nix`
- Updated the `nix/DETAILS.md` and `nix/README.md`
- Moved known issues to `nix/KNOWN_ISSUES.md`
- Improved output of `nix/scripts/build.sh`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-04 20:55:07 +02:00
yenda d5ef218584
use shadow-cljs
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: yenda <eric@status.im>
2020-04-30 15:43:46 +02:00
Jakub Sokołowski 7b6b620ceb
nix: use overlays instead of packageOverrides
Changes:
- Add `nix/DETAILS.md` for more in-depth info
- Rename some of `config.status-im` variables
- Drop `env` argument for Android build
- Use `overlays` instead of `packageOverrides`
- Move the `pkgs` overlay to `nix/overlay.nix`
- Move `nix/status-go/utils.nix` to `nix/tools`
- Make `shell.nix` use the `shells.default` only
- Use `default.nix` as target for `nix/scripts/shell.sh`
- Make `nix/scripts/shell.sh` use `--attr` instead of `target`
- Drop the `target` argument in favour of using `--attr`
- Drop unnecessary `src` from `nix/mobile/ios/default.nix`
- Move `mkShell` and `mergeSh` under `lib`
- Move `patched-go` package to `nix/pkgs` directory
- Move `gomobile` package to `nix/pkgs` directory
- Move `ANDROID_ABI_SPLIT` to `config.status-im.android.abi-split`
- Move `ANDROID_ABI_INCLUDE to `config.status-im.android.abi-include`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-29 11:53:33 +02:00