#!/usr/bin/env bash

set -euo pipefail

build() {
  pushd $(readlink -f $(dirname "${BASH_SOURCE[0]}")/..)
    yarn install --frozen-lockfile --mutex file:../../../../yarn.mutex
    yarn --mutex file:../../../../yarn.mutex build
  popd
}

lint() {
  pushd $(readlink -f $(dirname "${BASH_SOURCE[0]}")/..)
    yarn lint --no-fix
  popd
}

all() {
  build
  lint
}
