File vendorit-mastodon of Package container-vendor-gitlab-js

#!/usr/bin/bash

export LC_ALL=en_US.UTF-8
export LANG="${LC_ALL}"
export LANGUAGE="${LC_ALL}"

TARGET="$PWD/mastodon"

mkdir -p $TARGET/

echo "Copy input files to work directory"
cd /work/mastodon/
rsync -a $PWD/ $TARGET/
cd $TARGET
echo "Running yarn"
if yarn install --pure-lockfile --ignore-engines --production ; then
  echo "Cleaning up *.node files"
  rm -rv ./node_modules/*/prebuilds/
  find -name \*.node -print -delete ;

  echo "Fetching git deps"
  cache_dir="vendor/gems"
  git_cmdline="git clone --quiet --no-tags --single-branch"
  mkdir -p "${cache_dir}"
  pushd "${cache_dir}"
    ${git_cmdline} --branch openssl-3 -- https://github.com/ClearlyClaire/webpush           "web-push-clearlyclaire"
  popd

  echo "Compressing files"
  bsdtar -cJf /work/vendor.tar.xz \
    ${cache_dir} \
    node_modules ;
else
  echo "yarn failed" ;
  exit 1
fi
openSUSE Build Service is sponsored by