summaryrefslogtreecommitdiff
path: root/scripts/frontend/startup_css/startup_css_changed.sh
blob: f214e61cdfbe8c817de0dc102db6d37c02358f5d (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
36
37
38
39
40
#!/bin/sh

echo "-----------------------------------------------------------"
echo "If you run into any issues with Startup CSS generation"
echo "please check out the feedback issue:"
echo ""
echo "https://gitlab.com/gitlab-org/gitlab/-/issues/331812"
echo "-----------------------------------------------------------"

startup_glob="*stylesheets/startup*"

echo "Staging changes to '${startup_glob}' so we can check for untracked files..."
git add ${startup_glob}

if [ -n "$(git diff HEAD --name-only -- ${startup_glob})" ]; then
  diff=$(git diff HEAD -- ${startup_glob})
  cat <<EOF

Startup CSS changes detected!

It looks like there have been recent changes which require
regenerating the Startup CSS files.

**What should I do now?**

IMPORTANT: Please make sure to update your MR title with "[RUN AS-IF-FOSS]" and start a new MR pipeline

To fix this job, consider one of the following options:

  1. Regenerating locally with "yarn run generate:startup_css".
  2. Copy and apply the following diff:

----- start diff -----
$diff

----- end diff -------
EOF

  exit 1
fi