This repository was archived by the owner on Nov 21, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,21 @@ function finish {
9
9
docker rm browser-pattern-library & > /dev/null || true
10
10
}
11
11
12
+ if [[ $# -eq 0 ]]; then
13
+ commit=origin/master
14
+ elif [[ $# -eq 1 && $1 =~ ^pr-([1-9][0-9])* $ ]]; then
15
+ pr=${BASH_REMATCH[1]}
16
+ elif [[ $# -eq 1 ]]; then
17
+ commit=$1
18
+ else
19
+ echo " Usage: $0 COMMITISH"
20
+ echo " Examples:"
21
+ echo " master branch: $0 "
22
+ echo " specific commit: $0 fd89896"
23
+ echo " pull request: $0 pr-50"
24
+ exit 1
25
+ fi
26
+
12
27
trap finish EXIT
13
28
14
29
cd " $( dirname " $0 " ) /.."
@@ -18,11 +33,17 @@ mkdir -p var/pattern-library && cd "$_"
18
33
if ! [[ -d .git ]]; then
19
34
git clone
[email protected] :libero/pattern-library.git
.
20
35
else
21
- git fetch
22
- git reset --hard origin/master
23
36
git clean -d --force
24
37
fi
25
38
39
+ if [[ ${pr+x} ]]; then
40
+ git fetch origin " +refs/pull/${pr} /merge"
41
+ git checkout --force --quiet FETCH_HEAD
42
+ else
43
+ git fetch --all --prune
44
+ git reset --hard " ${commit} "
45
+ fi
46
+
26
47
docker-compose --file docker-compose.yml --file docker-compose.ci.yml build gulp
27
48
rm -rf export/*
28
49
docker run --name browser-pattern-library pattern-library_gulp npx gulp exportPatterns
You can’t perform that action at this time.
0 commit comments