#!/bin/bash

# this setup script is used locally to create an .npmrc file and run yarn install.
# It does not rely on Docker secrets, instead uses secrets being passed as build arguments
# from the docker-compose.yaml file

set -e

unique_id=theorchard_jenkins

# Append github configuration
sed "s/{{GITHUB_TOKEN}}/$GITHUB_TOKEN/" .npmrc.shadow > .npmrc

yarn install

rm -f .npmrc
