Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no-issue: Remove MediTrak/nvm workaround #5436

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions packages/meditrak-app/appcenter-post-clone.sh
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
#!/usr/bin/env bash

## This file runs on appcenter automated builds
## This file runs on App Center automated builds

## Move environment variables saved by appcenter as USER-DEFINED_VARIABLE_NAME into .env, ready for react-native-dotenv
echo "Setting up environment variables"
## Move environment variables saved by App Center as USER-DEFINED_VARIABLE_NAME into .env, ready for react-native-dotenv
echo -e "\033[32mSetting up environment variables\033m"
env | grep "USER-DEFINED_.*" | awk -F "USER-DEFINED_" '{print $2}' > .env

# install nvm, yarn
# Install nvm, Yarn
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

# Workaround for meditrak-app needing node v16 but the monorepo using v14
echo "16.20.2" > ../../.nvmrc
Comment on lines -14 to -15
Copy link
Contributor Author

@jaskfla jaskfla Feb 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only actual change

The rest is capitalisation and echo-ing something in 🟩green🟩

nvm install
nvm use
npm install -g yarn

set -x

# install meditrak-app and root (for shared scripts)
# Install meditrak-app and root (for shared scripts)
SKIP_BUILD_INTERNAL_DEPENDENCIES=true yarn workspaces focus tupaia @tupaia/meditrak-app

# build meditrak-app deps
# Build meditrak-app deps
yarn workspace @tupaia/access-policy build-dev
yarn workspace @tupaia/expression-parser build-dev

## Appcenter does not support yarn workspaces (https://github.com/microsoft/appcenter/issues/278)
## Workaround: symlink npm to echo so it doesnt run (appcenter will call `npm install` -> `echo install`)
ln -sf $(which echo) $(which npm)
## App Center does not support Yarn workspaces (https://github.com/microsoft/appcenter/issues/278)
## Workaround: symlink `npm` to `echo` so it doesnt run (App Center will call `npm install` -> `echo install`)
ln -sf $(which echo) $(which npm)
Loading