Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6221b42f2a |
@@ -5,6 +5,7 @@ project-board:
|
||||
min-reviewers: 1
|
||||
tested-pr-label-name: 'Tested - Issues'
|
||||
contributor-column-name: 'CONTRIBUTOR'
|
||||
to-rebase-column-name: 'TO REBASE'
|
||||
review-column-name: 'REVIEW'
|
||||
test-column-name: 'E2E Tests'
|
||||
|
||||
|
||||
@@ -218,18 +218,23 @@ release-android: keystore build-android ##@build Build signed Android APK
|
||||
|
||||
release-ios: export TARGET := ios
|
||||
release-ios: export BUILD_ENV ?= prod
|
||||
release-ios: watchman-clean ios-clean jsbundle ##@build Build release for iOS release
|
||||
xcodebuild \
|
||||
-scheme StatusIm \
|
||||
-configuration Release \
|
||||
-workspace ios/StatusIm.xcworkspace \
|
||||
-destination 'generic/platform=iOS' \
|
||||
-UseModernBuildSystem=N clean archive
|
||||
release-ios: watchman-clean ##@build Build release for iOS release
|
||||
@git clean -dxf -f target/ios && \
|
||||
$(MAKE) jsbundle-ios && \
|
||||
xcodebuild -workspace ios/StatusIm.xcworkspace -scheme StatusIm -configuration Release -destination 'generic/platform=iOS' -UseModernBuildSystem=N clean archive
|
||||
|
||||
jsbundle: SHELL := /bin/sh
|
||||
jsbundle: export BUILD_ENV ?= prod
|
||||
jsbundle: ##@build Build JavaScript and Clojurescript bundle for iOS and Android
|
||||
nix/scripts/build.sh targets.mobile.jsbundle
|
||||
jsbundle-android: SHELL := /bin/sh
|
||||
jsbundle-android: export TARGET := android
|
||||
jsbundle-android: export BUILD_ENV ?= prod
|
||||
jsbundle-android: ##@jsbundle Compile JavaScript and Clojurescript into app directory
|
||||
# Call nix-build to build the 'targets.mobile.android.jsbundle' attribute and copy the.js files to the project root
|
||||
nix/scripts/build.sh targets.mobile.android.jsbundle && \
|
||||
mv result/*.js ./
|
||||
|
||||
jsbundle-ios: export TARGET := ios
|
||||
jsbundle-ios: export BUILD_ENV ?= prod
|
||||
jsbundle-ios: ##@jsbundle Compile JavaScript and Clojure into index.ios.js
|
||||
yarn shadow-cljs release mobile
|
||||
|
||||
#--------------
|
||||
# status-go lib
|
||||
@@ -360,7 +365,6 @@ component-test: ##@test Run component tests once in NodeJS
|
||||
yarn shadow-cljs compile component-test && \
|
||||
jest --config=test/jest/jest.config.js
|
||||
|
||||
#--------------
|
||||
# Other
|
||||
#--------------
|
||||
|
||||
@@ -369,10 +373,6 @@ geth-connect: ##@other Connect to Geth on the device
|
||||
adb forward tcp:8545 tcp:8545 && \
|
||||
build/bin/geth attach http://localhost:8545
|
||||
|
||||
ios-clean: SHELL := /bin/sh
|
||||
ios-clean: ##@prepare Clean iOS build artifacts
|
||||
git clean -dxf -f target/ios
|
||||
|
||||
android-clean: export TARGET := gradle
|
||||
android-clean: ##@prepare Clean Gradle state
|
||||
git clean -dxf -f ./android/app/build; \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
@@ -49,6 +49,7 @@ pipeline {
|
||||
stage('Prep') {
|
||||
steps {
|
||||
script {
|
||||
utils.doGitRebasePR()
|
||||
utils.symlinkEnv()
|
||||
println("Build Number: ${utils.genBuildNumber()}")
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
@@ -48,6 +48,7 @@ pipeline {
|
||||
stage('Prep') {
|
||||
steps {
|
||||
script {
|
||||
utils.doGitRebasePR()
|
||||
utils.symlinkEnv()
|
||||
println("Build Number: ${utils.genBuildNumber()}")
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
pipeline {
|
||||
agent { label params.AGENT_LABEL }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
@@ -41,6 +41,13 @@ pipeline {
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Prep') {
|
||||
steps {
|
||||
script {
|
||||
utils.doGitRebasePR()
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Checks') {
|
||||
parallel {
|
||||
stage('Lint') {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
pipeline {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
pipeline {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
pipeline {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
pipeline {
|
||||
agent { label 'macos' }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.7.9'
|
||||
library 'status-jenkins-lib@v1.7.3'
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
|
||||
@@ -365,43 +365,6 @@ dispatch.
|
||||
(str "Hello " username)]])
|
||||
```
|
||||
|
||||
### Registering effects
|
||||
|
||||
When registering re-frame effects (`reg-fx`), prefer to expose a data-only
|
||||
interface because that will allow event handlers to stay pure.
|
||||
|
||||
For instance, if an effect needs a `on-success` callback, allow it to receive a
|
||||
*re-frame event vector*. This approach is used by us in the [json-rpc/call
|
||||
effect](src/status_im2/common/json_rpc/events.cljs), but also by third-party
|
||||
effects, such as https://github.com/Day8/re-frame-http-fx. For the complete
|
||||
rationale, see [PR #15936](https://github.com/status-im/status-mobile/pull/15936).
|
||||
|
||||
### Using the effect `:json-rpc/call`
|
||||
|
||||
Prefer the pure version of `:json-rpc/call` (no callbacks).
|
||||
|
||||
```clojure
|
||||
;; not as good
|
||||
(rf/defn accept-contact-request
|
||||
{:events [:activity-center.contact-requests/accept]}
|
||||
[_ contact-id]
|
||||
{:json-rpc/call
|
||||
[{:method "wakuext_acceptContactRequest"
|
||||
:params [{:id contact-id}]
|
||||
:on-success #(rf/dispatch [:sanitize-messages-and-process-response %])
|
||||
:on-error #(rf/dispatch [:activity-center.contact-requests/accept-error contact-id %])}]})
|
||||
|
||||
;; better
|
||||
(rf/defn accept-contact-request
|
||||
{:events [:activity-center.contact-requests/accept]}
|
||||
[_ contact-id]
|
||||
{:json-rpc/call
|
||||
[{:method "wakuext_acceptContactRequest"
|
||||
:params [{:id contact-id}]
|
||||
:on-success [:sanitize-messages-and-process-response]
|
||||
:on-error [:activity-center.contact-requests/accept-error contact-id]}]})
|
||||
```
|
||||
|
||||
### Registering event handlers
|
||||
|
||||
Events must always be declared with the `utils.fx/defn` macro. Also, don't use
|
||||
|
||||
@@ -182,6 +182,17 @@ def build_ios_e2e
|
||||
)
|
||||
end
|
||||
|
||||
def upload_to_diawi(source)
|
||||
diawi(
|
||||
file: source,
|
||||
timeout: 120,
|
||||
check_status_delay: 5,
|
||||
token: ENV['DIAWI_TOKEN']
|
||||
)
|
||||
# save the URL to a file for use in CI
|
||||
File.write('diawi.out', lane_context[SharedValues::UPLOADED_FILE_LINK_TO_DIAWI])
|
||||
end
|
||||
|
||||
platform :ios do
|
||||
desc '`fastlane ios adhoc` - ad-hoc lane for iOS.'
|
||||
desc 'This lane is used for PRs, Releases, etc.'
|
||||
@@ -245,6 +256,27 @@ platform :ios do
|
||||
)
|
||||
end
|
||||
|
||||
desc '`fastlane ios clean` - remove inactive TestFlight users'
|
||||
lane :clean do
|
||||
clean_testflight_testers(
|
||||
username: ENV['FASTLANE_APPLE_ID'],
|
||||
days_of_inactivity: 30
|
||||
)
|
||||
# In the future we can try using 'oldest_build_allowed'
|
||||
end
|
||||
|
||||
desc '`fastlane ios upload-diawi` - upload .ipa to diawi'
|
||||
desc 'expects to have an .ipa prepared: `status-ios/StatusIm.ipa`'
|
||||
desc 'expects to have a diawi token as DIAWI_TOKEN env variable'
|
||||
desc 'expects to have a github token as GITHUB_TOKEN env variable'
|
||||
desc "will fails if file isn't there"
|
||||
desc '---'
|
||||
desc 'Output: writes `fastlane/diawi.out` file url of the uploded file'
|
||||
lane :upload_diawi do
|
||||
ipa = ENV['DIAWI_IPA'] || 'status-ios/StatusIm.ipa'
|
||||
upload_to_diawi(ipa)
|
||||
end
|
||||
|
||||
desc '`fastlane ios saucelabs` - upload .app to sauce labs'
|
||||
desc 'also notifies in a GitHub comments'
|
||||
desc 'expects to have an .apk prepared: `result/app.apk`'
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'fastlane', '>= 2.131.0'
|
||||
|
||||
plugins_path = ENV['FASTLANE_PLUGINFILE_PATH'] ||
|
||||
File.join(__dir__, 'Pluginfile')
|
||||
eval_gemfile(plugins_path) if plugins_path
|
||||
|
||||
@@ -3,21 +3,21 @@ GEM
|
||||
specs:
|
||||
CFPropertyList (3.0.6)
|
||||
rexml
|
||||
addressable (2.8.4)
|
||||
addressable (2.8.1)
|
||||
public_suffix (>= 2.0.2, < 6.0)
|
||||
artifactory (3.0.15)
|
||||
atomos (0.1.3)
|
||||
aws-eventstream (1.2.0)
|
||||
aws-partitions (1.768.0)
|
||||
aws-sdk-core (3.173.0)
|
||||
aws-partitions (1.728.0)
|
||||
aws-sdk-core (3.170.0)
|
||||
aws-eventstream (~> 1, >= 1.0.2)
|
||||
aws-partitions (~> 1, >= 1.651.0)
|
||||
aws-sigv4 (~> 1.5)
|
||||
jmespath (~> 1, >= 1.6.1)
|
||||
aws-sdk-kms (1.64.0)
|
||||
aws-sdk-kms (1.63.0)
|
||||
aws-sdk-core (~> 3, >= 3.165.0)
|
||||
aws-sigv4 (~> 1.1)
|
||||
aws-sdk-s3 (1.122.0)
|
||||
aws-sdk-s3 (1.119.1)
|
||||
aws-sdk-core (~> 3, >= 3.165.0)
|
||||
aws-sdk-kms (~> 1)
|
||||
aws-sigv4 (~> 1.4)
|
||||
@@ -65,8 +65,8 @@ GEM
|
||||
faraday-retry (1.0.3)
|
||||
faraday_middleware (1.2.0)
|
||||
faraday (~> 1.0)
|
||||
fastimage (2.2.7)
|
||||
fastlane (2.212.2)
|
||||
fastimage (2.2.6)
|
||||
fastlane (2.212.1)
|
||||
CFPropertyList (>= 2.3, < 4.0.0)
|
||||
addressable (>= 2.8, < 3.0.0)
|
||||
artifactory (~> 3.0)
|
||||
@@ -105,8 +105,11 @@ GEM
|
||||
xcodeproj (>= 1.13.0, < 2.0.0)
|
||||
xcpretty (~> 0.3.0)
|
||||
xcpretty-travis-formatter (>= 0.0.3)
|
||||
fastlane-plugin-clean_testflight_testers (0.3.0)
|
||||
fastlane-plugin-diawi (2.1.0)
|
||||
rest-client (>= 2.0.0)
|
||||
gh_inspector (1.1.3)
|
||||
google-apis-androidpublisher_v3 (0.42.0)
|
||||
google-apis-androidpublisher_v3 (0.36.0)
|
||||
google-apis-core (>= 0.11.0, < 2.a)
|
||||
google-apis-core (0.11.0)
|
||||
addressable (~> 2.5, >= 2.5.1)
|
||||
@@ -137,7 +140,7 @@ GEM
|
||||
google-cloud-core (~> 1.6)
|
||||
googleauth (>= 0.16.2, < 2.a)
|
||||
mini_mime (~> 1.0)
|
||||
googleauth (1.5.2)
|
||||
googleauth (1.3.0)
|
||||
faraday (>= 0.17.3, < 3.a)
|
||||
jwt (>= 1.4, < 3.0)
|
||||
memoist (~> 0.16)
|
||||
@@ -145,6 +148,7 @@ GEM
|
||||
os (>= 0.9, < 2.0)
|
||||
signet (>= 0.16, < 2.a)
|
||||
highline (2.0.3)
|
||||
http-accept (1.7.0)
|
||||
http-cookie (1.0.5)
|
||||
domain_name (~> 0.5)
|
||||
httpclient (2.8.3)
|
||||
@@ -152,12 +156,16 @@ GEM
|
||||
json (2.6.3)
|
||||
jwt (2.7.0)
|
||||
memoist (0.16.2)
|
||||
mime-types (3.4.1)
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2023.0218.1)
|
||||
mini_magick (4.12.0)
|
||||
mini_mime (1.1.2)
|
||||
multi_json (1.15.0)
|
||||
multipart-post (2.0.0)
|
||||
nanaimo (0.3.0)
|
||||
naturally (2.2.1)
|
||||
netrc (0.11.0)
|
||||
optparse (0.1.1)
|
||||
os (1.1.4)
|
||||
plist (3.7.0)
|
||||
@@ -167,6 +175,11 @@ GEM
|
||||
declarative (< 0.1.0)
|
||||
trailblazer-option (>= 0.1.1, < 0.2.0)
|
||||
uber (< 0.2.0)
|
||||
rest-client (2.1.0)
|
||||
http-accept (>= 1.7.0, < 2.0)
|
||||
http-cookie (>= 1.0.2, < 2.0)
|
||||
mime-types (>= 1.16, < 4.0)
|
||||
netrc (~> 0.8)
|
||||
retriable (3.1.2)
|
||||
rexml (3.2.5)
|
||||
rouge (2.0.7)
|
||||
@@ -213,6 +226,8 @@ PLATFORMS
|
||||
|
||||
DEPENDENCIES
|
||||
fastlane (>= 2.131.0)
|
||||
fastlane-plugin-clean_testflight_testers
|
||||
fastlane-plugin-diawi
|
||||
|
||||
BUNDLED WITH
|
||||
2.3.9
|
||||
2.4.6
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# Autogenerated by fastlane
|
||||
#
|
||||
# Ensure this file is checked in to source control!
|
||||
|
||||
gem 'fastlane-plugin-clean_testflight_testers'
|
||||
gem 'fastlane-plugin-diawi'
|
||||
@@ -24,6 +24,8 @@ let
|
||||
|
||||
shellHook = ''
|
||||
[ -z "$STATUS_MOBILE_HOME" ] && echo "STATUS_MOBILE_HOME is empty!" && exit 1
|
||||
|
||||
export FASTLANE_PLUGINFILE_PATH=$STATUS_MOBILE_HOME/fastlane/Pluginfile
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "15s8van7r2ad3dq6i03l3z4hqnvxcq75a3h72kxvf9an53sqma20";
|
||||
sha256 = "1ypdmpdn20hxp5vwxz3zc04r5xcwqc25qszdlg41h8ghdqbllwmw";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.8.4";
|
||||
version = "2.8.1";
|
||||
};
|
||||
artifactory = {
|
||||
groups = ["default"];
|
||||
@@ -45,10 +45,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1256rf6zjh3canwr636w7yczbvhh72cpz2fw5ixljbh4fcfkrvlm";
|
||||
sha256 = "0q3q19insq5ablmr6ypq033qg1gsar5mdphhp7xg80rd615cnq97";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.768.0";
|
||||
version = "1.728.0";
|
||||
};
|
||||
aws-sdk-core = {
|
||||
dependencies = ["aws-eventstream" "aws-partitions" "aws-sigv4" "jmespath"];
|
||||
@@ -56,10 +56,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "10djgbz4k9w3axka8xrhf97h9yh9svi5g5xvncfwnkg6h22w2177";
|
||||
sha256 = "0zc4zhv2wq7s5p8c9iaplama1lpg2kwldg81j83c8w4xydf1wd2r";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.173.0";
|
||||
version = "3.170.0";
|
||||
};
|
||||
aws-sdk-kms = {
|
||||
dependencies = ["aws-sdk-core" "aws-sigv4"];
|
||||
@@ -67,10 +67,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1bcm0c9f7xy5qj5f0z3gddqslhb2vzrj9smc39pgqyq4jmn5kpj0";
|
||||
sha256 = "0v87zi28dfmrv7bv91yfldccnpd63n295siirbz7wqv1rajn8n02";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.64.0";
|
||||
version = "1.63.0";
|
||||
};
|
||||
aws-sdk-s3 = {
|
||||
dependencies = ["aws-sdk-core" "aws-sdk-kms" "aws-sigv4"];
|
||||
@@ -78,10 +78,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "01cryf8kfkmlsxb327szcwcagsp7lss5gmk6zxlgap65lv8bc7rx";
|
||||
sha256 = "1rpnlzsl52znhcki13jkwdshgwf51pn26267481f4fa842gr7xgp";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.122.0";
|
||||
version = "1.119.1";
|
||||
};
|
||||
aws-sigv4 = {
|
||||
dependencies = ["aws-eventstream"];
|
||||
@@ -357,10 +357,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1pd7pamzhdz2w0fbcvsfn2nyslznvphnwj16zw35g2b28zd2xyzx";
|
||||
sha256 = "0nnggg20za5vamdpkgrxxa32z33d8hf0g2bciswkhqnc6amb3yjr";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.2.7";
|
||||
version = "2.2.6";
|
||||
};
|
||||
fastlane = {
|
||||
dependencies = ["CFPropertyList" "addressable" "artifactory" "aws-sdk-s3" "babosa" "colored" "commander" "dotenv" "emoji_regex" "excon" "faraday" "faraday-cookie_jar" "faraday_middleware" "fastimage" "gh_inspector" "google-apis-androidpublisher_v3" "google-apis-playcustomapp_v1" "google-cloud-storage" "highline" "json" "jwt" "mini_magick" "multipart-post" "naturally" "optparse" "plist" "rubyzip" "security" "simctl" "terminal-notifier" "terminal-table" "tty-screen" "tty-spinner" "word_wrap" "xcodeproj" "xcpretty" "xcpretty-travis-formatter"];
|
||||
@@ -368,10 +368,31 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "15sa3v3aaslympg9nmadmpxpbzykdiybzxn3navc7mf0iscb3q7s";
|
||||
sha256 = "0b22m2dkydyv2si55b1jzznzgxf2ycx2aarv1j5p25k861h2gsml";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.212.2";
|
||||
version = "2.212.1";
|
||||
};
|
||||
fastlane-plugin-clean_testflight_testers = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0qkcjf7xrnki4v94mcgcm3v2f89vq8clwxx1d5ipv0wwm5ri26c9";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.3.0";
|
||||
};
|
||||
fastlane-plugin-diawi = {
|
||||
dependencies = ["rest-client"];
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1sjznx9hwlfa7ndv7av870dvl0cvmh68yk381r55ylw4jjvk5mwl";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.1.0";
|
||||
};
|
||||
gh_inspector = {
|
||||
groups = ["default"];
|
||||
@@ -389,10 +410,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0ks2ak4fcvlflhyinykvd88g2ybxwsbc347aww349zhn1mqprbvg";
|
||||
sha256 = "1mbnmn36z1cnsd6ar76p9wvqi0ac6wlpm1p1lqczivain16qma76";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.42.0";
|
||||
version = "0.36.0";
|
||||
};
|
||||
google-apis-core = {
|
||||
dependencies = ["addressable" "googleauth" "httpclient" "mini_mime" "representable" "retriable" "rexml" "webrick"];
|
||||
@@ -487,10 +508,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1lj5haarpn7rybbq9s031zcn9ji3rlz5bk64bwa2j34q5s1h5gis";
|
||||
sha256 = "1hpwgwhk0lmnknkw8kbdfxn95qqs6aagpq815l5fkw9w6mi77pai";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.5.2";
|
||||
version = "1.3.0";
|
||||
};
|
||||
highline = {
|
||||
groups = ["default"];
|
||||
@@ -502,6 +523,16 @@
|
||||
};
|
||||
version = "2.0.3";
|
||||
};
|
||||
http-accept = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "09m1facypsdjynfwrcv19xcb1mqg8z6kk31g8r33pfxzh838c9n6";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.7.0";
|
||||
};
|
||||
http-cookie = {
|
||||
dependencies = ["domain_name"];
|
||||
groups = ["default"];
|
||||
@@ -563,6 +594,27 @@
|
||||
};
|
||||
version = "0.16.2";
|
||||
};
|
||||
mime-types = {
|
||||
dependencies = ["mime-types-data"];
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0ipw892jbksbxxcrlx9g5ljq60qx47pm24ywgfbyjskbcl78pkvb";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.4.1";
|
||||
};
|
||||
mime-types-data = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1pky3vzaxlgm9gw5wlqwwi7wsw3jrglrfflrppvvnsrlaiz043z9";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.2023.0218.1";
|
||||
};
|
||||
mini_magick = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
@@ -623,6 +675,16 @@
|
||||
};
|
||||
version = "2.2.1";
|
||||
};
|
||||
netrc = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0gzfmcywp1da8nzfqsql2zqi648mfnx6qwkig3cv36n9m0yy676y";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.11.0";
|
||||
};
|
||||
optparse = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
@@ -684,6 +746,17 @@
|
||||
};
|
||||
version = "3.2.0";
|
||||
};
|
||||
rest-client = {
|
||||
dependencies = ["http-accept" "http-cookie" "mime-types" "netrc"];
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1qs74yzl58agzx9dgjhcpgmzfn61fqkk33k1js2y5yhlvc5l19im";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.1.0";
|
||||
};
|
||||
retriable = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
import "node-libs-react-native/globals";
|
||||
import "./result/index.js";
|
||||
import "./app/index.js";
|
||||
|
||||
@@ -55,12 +55,12 @@ The [`nix/scripts/shell.sh`](./scripts/shell.sh) script is essentially a wrapper
|
||||
|
||||
# Building
|
||||
|
||||
We will use the `make jsbundle` target as an example of a derivation you can build using Nix:
|
||||
We will use the `make jsbundle-android` target as an example of a derivation you can build using Nix:
|
||||
|
||||
1. `make jsbundle` is called by developer
|
||||
2. `make` calls `nix/scripts/build.sh targets.mobile.jsbundle`
|
||||
3. [`build.sh`](/nix/scripts/build.sh) calls `nix-build --attr targets.mobile.jsbundle` with extra arguments
|
||||
4. `nix-build` builds the derivation from [`nix/mobile/jsbundle/default.nix`](/nix/mobile/jsbundle/default.nix)
|
||||
1. `make jsbundle-android` is called by developer
|
||||
2. `make` calls `nix/scripts/build.sh targets.mobile.android.jsbundle`
|
||||
3. [`build.sh`](/nix/scripts/build.sh) calls `nix-build --attr targets.mobile.android.jsbundle` with extra arguments
|
||||
4. `nix-build` builds the derivation from [`nix/mobile/android/jsbundle/default.nix`](/nix/mobile/android/jsbundle/default.nix)
|
||||
|
||||
The same can be done for other targets like `targets.mobile.android.release`.
|
||||
Except in that case extra arguments are required which is why the [`scripts/release-android.sh`](/scripts/release-android.sh) is used in the `make release-android` target.
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
{ pkgs, deps, callPackage, mkShell
|
||||
, jsbundle, status-go, androidPkgs, androidShell }:
|
||||
, status-go, androidPkgs, androidShell }:
|
||||
|
||||
rec {
|
||||
release = callPackage ./release.nix {
|
||||
inherit jsbundle status-go;
|
||||
};
|
||||
let
|
||||
# Import a jsbundle compiled out of clojure codebase
|
||||
jsbundle = callPackage ./jsbundle { };
|
||||
|
||||
release = callPackage ./release.nix { inherit jsbundle status-go; };
|
||||
in {
|
||||
# TARGETS
|
||||
inherit release jsbundle;
|
||||
|
||||
shell = mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
{ secretsFile ? "" }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "status-mobile-jsbundle";
|
||||
name = "status-mobile-build-jsbundle-android";
|
||||
src =
|
||||
let path = ./../../..;
|
||||
let path = ./../../../..;
|
||||
# We use builtins.path so that we can name the resulting derivation,
|
||||
# otherwise the name would be taken from the checkout directory,
|
||||
# which is outside of our control inherit path;
|
||||
@@ -25,7 +25,7 @@ stdenv.mkDerivation {
|
||||
ignoreVCS = false;
|
||||
include = [
|
||||
"VERSION" "BUILD_NUMBER" "scripts/version/.*"
|
||||
"src/.*" "shadow-cljs.edn"
|
||||
"src/.*" "shadow-cljs.edn" "index.js"
|
||||
# I want to avoid including the whole .git directory
|
||||
".git/HEAD" ".git/objects" ".git/refs/heads/.*"
|
||||
# shadow-cljs expects these for deps resolution
|
||||
@@ -77,6 +77,6 @@ stdenv.mkDerivation {
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r result/* $out/
|
||||
cp -r index.js app $out/
|
||||
'';
|
||||
}
|
||||
@@ -46,7 +46,7 @@ in stdenv.mkDerivation rec {
|
||||
root = path;
|
||||
include = [
|
||||
"package.json" "yarn.lock" "metro.config.js" "babel.config.js"
|
||||
"resources/.*" "translations/.*" "src/js/.*" "index.js"
|
||||
"resources/.*" "translations/.*" "src/js/.*"
|
||||
"modules/react-native-status/android.*" "android/.*"
|
||||
envFileName "VERSION" "status-go-version.json" "react-native.config.js"
|
||||
];
|
||||
@@ -94,10 +94,8 @@ in stdenv.mkDerivation rec {
|
||||
# Export all vars from .env file
|
||||
export $(cut -d= -f1 .env)
|
||||
|
||||
# Symlink React Native entrypoint.
|
||||
cp -Lr ${builtJsBundle} ./result
|
||||
pwd
|
||||
find -L result
|
||||
# Copy index.js and app/ input files
|
||||
cp -ra --no-preserve=ownership ${builtJsBundle}/* ./
|
||||
|
||||
# Copy android/ directory
|
||||
mkdir -p ./android/build
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
let
|
||||
fastlane = callPackage ./fastlane { };
|
||||
|
||||
jsbundle = callPackage ./jsbundle { };
|
||||
|
||||
android = callPackage ./android {
|
||||
inherit jsbundle;
|
||||
status-go = status-go.mobile.android;
|
||||
};
|
||||
|
||||
@@ -29,5 +26,5 @@ in {
|
||||
};
|
||||
|
||||
# TARGETS
|
||||
inherit android ios fastlane jsbundle;
|
||||
inherit android ios fastlane;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"@react-native-community/blur": "git+https://github.com/status-im/react-native-blur#refs/tags/v4.3.3-status",
|
||||
"@react-native-community/cameraroll": "git+https://github.com/status-im/react-native-cameraroll.git#refs/tags/v4.0.4-status.0",
|
||||
"@react-native-community/clipboard": "^1.2.2",
|
||||
"@react-native-community/hooks": "^3.0.0",
|
||||
"@react-native-community/hooks": "^2.5.1",
|
||||
"@react-native-community/masked-view": "^0.1.6",
|
||||
"@react-native-community/netinfo": "^4.4.0",
|
||||
"@react-native-community/push-notification-ios": "^1.4.1",
|
||||
|
||||
|
After Width: | Height: | Size: 307 B |
|
After Width: | Height: | Size: 382 B |
|
After Width: | Height: | Size: 282 B |
|
After Width: | Height: | Size: 381 B |
|
After Width: | Height: | Size: 772 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 505 B |
|
After Width: | Height: | Size: 654 B |
|
After Width: | Height: | Size: 630 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 294 B |
|
After Width: | Height: | Size: 469 B |
|
After Width: | Height: | Size: 560 B |
|
After Width: | Height: | Size: 816 B |
|
After Width: | Height: | Size: 736 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 695 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 736 B |
|
After Width: | Height: | Size: 1002 B |
|
After Width: | Height: | Size: 625 B |
|
After Width: | Height: | Size: 853 B |
|
After Width: | Height: | Size: 503 B |
|
After Width: | Height: | Size: 684 B |
|
After Width: | Height: | Size: 246 B |
|
After Width: | Height: | Size: 286 B |
|
After Width: | Height: | Size: 464 B |
|
After Width: | Height: | Size: 547 B |
|
After Width: | Height: | Size: 646 B |
|
After Width: | Height: | Size: 838 B |
|
Before Width: | Height: | Size: 421 B After Width: | Height: | Size: 372 B |
|
Before Width: | Height: | Size: 595 B After Width: | Height: | Size: 502 B |
|
After Width: | Height: | Size: 353 B |
|
After Width: | Height: | Size: 521 B |
|
After Width: | Height: | Size: 462 B |
|
After Width: | Height: | Size: 727 B |
|
After Width: | Height: | Size: 883 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 367 B |
|
After Width: | Height: | Size: 509 B |
|
After Width: | Height: | Size: 312 B |
|
After Width: | Height: | Size: 416 B |
|
After Width: | Height: | Size: 279 B |
|
After Width: | Height: | Size: 351 B |
|
After Width: | Height: | Size: 592 B |
|
After Width: | Height: | Size: 771 B |
|
After Width: | Height: | Size: 630 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 383 B |
|
After Width: | Height: | Size: 493 B |
|
After Width: | Height: | Size: 824 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 628 B |
|
After Width: | Height: | Size: 848 B |
|
After Width: | Height: | Size: 470 B |
|
After Width: | Height: | Size: 740 B |
|
After Width: | Height: | Size: 486 B |
|
After Width: | Height: | Size: 689 B |
|
After Width: | Height: | Size: 652 B |
|
After Width: | Height: | Size: 895 B |
|
Before Width: | Height: | Size: 618 B |
|
Before Width: | Height: | Size: 798 B |
|
Before Width: | Height: | Size: 657 B |
|
Before Width: | Height: | Size: 1016 B |
|
Before Width: | Height: | Size: 647 B After Width: | Height: | Size: 684 B |
|
Before Width: | Height: | Size: 916 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 549 B |
|
Before Width: | Height: | Size: 816 B |
|
Before Width: | Height: | Size: 607 B |
|
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 595 B |
|
Before Width: | Height: | Size: 752 B |
|
Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 782 B |