diff --git a/.dockerignore b/.dockerignore --- a/.dockerignore +++ b/.dockerignore @@ -15,7 +15,6 @@ native !native/package.json !native/.flowconfig -!native/postinstall.sh !native/ios/Podfile !native/ios/pod-patch !native/cpp/CommonCpp/grpc diff --git a/keyserver/Dockerfile b/keyserver/Dockerfile --- a/keyserver/Dockerfile +++ b/keyserver/Dockerfile @@ -25,15 +25,15 @@ USER root RUN \ if [ -z "`getent group $HOST_GID`" ]; then \ - addgroup --system --gid $HOST_GID comm; \ + addgroup --system --gid $HOST_GID comm; \ else \ - groupmod --new-name comm `getent group $HOST_GID | cut -d: -f1`; \ + groupmod --new-name comm `getent group $HOST_GID | cut -d: -f1`; \ fi && \ if [ -z "`getent passwd $HOST_UID`" ]; then \ - adduser --system --uid $HOST_UID --ingroup comm --shell /bin/bash comm; \ + adduser --system --uid $HOST_UID --ingroup comm --shell /bin/bash comm; \ else \ - usermod --login comm --gid $HOST_GID --home /home/comm --move-home \ - `getent passwd $HOST_UID | cut -d: -f1`; \ + usermod --login comm --gid $HOST_GID --home /home/comm --move-home \ + `getent passwd $HOST_UID | cut -d: -f1`; \ fi #------------------------------------------------------------------------------- @@ -101,11 +101,11 @@ #------------------------------------------------------------------------------- # Copy in package.json and yarn.lock files -COPY --chown=comm package.json yarn.lock ./ +COPY --chown=comm package.json yarn.lock postinstall.sh ./ COPY --chown=comm keyserver/package.json keyserver/.flowconfig keyserver/ COPY --chown=comm lib/package.json lib/.flowconfig lib/ COPY --chown=comm web/package.json web/.flowconfig web/ -COPY --chown=comm native/package.json native/.flowconfig native/postinstall.sh native/ +COPY --chown=comm native/package.json native/.flowconfig native/ COPY --chown=comm landing/package.json landing/.flowconfig landing/ COPY --chown=comm desktop/package.json desktop/ COPY --chown=comm keyserver/addons/rust-node-addon/package.json \ diff --git a/native/package.json b/native/package.json --- a/native/package.json +++ b/native/package.json @@ -10,7 +10,6 @@ "clean-android": "rm -rf android/build android/app/build android/app/.cxx", "clean-ios": "rm -rf ios/Pods/", "clean-all": "yarn clean && rm -rf ~/Library/Developer/Xcode/DerivedData/Comm-*; cd android && (./gradlew clean || true)", - "postinstall": "bash ./postinstall.sh", "start": "COMM_DEV=1 yarn expo start --dev-client", "dev": "yarn start", "test": "yarn jest", @@ -40,8 +39,6 @@ "jetifier": "^1.6.4", "jsonwebtoken": "^9.0.0", "metro-react-native-babel-preset": "^0.72.3", - "patch-package": "^6.4.7", - "postinstall-postinstall": "^2.0.0", "react-devtools": "^4.27.0", "react-native-codegen": "^0.70.6", "react-test-renderer": "18.1.0", diff --git a/package.json b/package.json --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "rust-pre-commit": "./scripts/rust_pre_commit.sh", "terraform-pre-commit": "./scripts/terraform_pre_commit.sh", "prepare": "husky install", - "arcpatch": "git pull --all --tags && arc patch" + "arcpatch": "git pull --all --tags && arc patch", + "postinstall": "bash ./postinstall.sh" }, "devDependencies": { "babel-eslint": "^10.1.0", @@ -41,6 +42,8 @@ "gaxios": "^4.3.2", "husky": "^7.0.0", "lint-staged": "^12.1.4", + "patch-package": "^6.4.7", + "postinstall-postinstall": "^2.0.0", "prettier": "^2.1.2" }, "resolutions": { diff --git a/native/postinstall.sh b/postinstall.sh rename from native/postinstall.sh rename to postinstall.sh --- a/native/postinstall.sh +++ b/postinstall.sh @@ -7,14 +7,12 @@ exit 0 fi -cd ../ echo '{"name": "olm", "version": "3.2.4"}' > ./node_modules/olm/package.json yarn patch-package yarn flow-mono create-symlinks native -cd native -yarn jetify +yarn workspace native jetify if [[ "$OSTYPE" == "darwin"* ]]; then - (cd ios && PATH=/usr/bin:"$PATH" pod install) + (cd native/ios && PATH=/usr/bin:"$PATH" pod install) fi