Welcome to mirror list, hosted at ThFree Co, Russian Federation.

compare_css_compilers.sh « frontend « scripts - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: faf208716782880ce308828207c4309485f4c224 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'

if [ ! -d "glfm_specification" ] || [ ! -f "GITALY_SERVER_VERSION" ]; then
  echo 'Please run this from the gitlab root folder with `./scripts/frontend/compare_css_compilers.sh`'
  exit 1
fi

function clean_up {
  rm -rf public/assets
  rm -rf app/assets/builds/*
  rm -rf tmp/cache/assets
}

rm -rf tmp/css_compare
clean_up

export SKIP_YARN_INSTALL=1

echo "Compiling with sassc-rails"
export USE_NEW_CSS_PIPELINE=0
time bin/rails assets:precompile
scripts/frontend/clean_css_assets.mjs public/assets tmp/css_compare/sassc-rails

clean_up

export USE_NEW_CSS_PIPELINE=1
echo "Compiling with dart-sass"
time bin/rails assets:precompile
scripts/frontend/clean_css_assets.mjs public/assets tmp/css_compare/cssbundling

clean_up

echo 'You now can run `diff -u tmp/css_compare/sassc-rails tmp/css_compare/cssbundling` to diff the two'