-
-
Notifications
You must be signed in to change notification settings - Fork 111
/
.gitlab-ci.yml
60 lines (53 loc) · 1.67 KB
/
.gitlab-ci.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
image: debian:latest
variables:
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- export DEBIAN_FRONTEND= noninteractive
- apt-get update -y
- apt-get install -y zip unzip nodejs jsonlint jq
stages:
- build
- deploy
hash rules:
stage: build
script:
- sha256sum data/data.min.json | awk '{print $1}' > rules.min.hash
- node build_tools/minifyDataJSON.js "data/data.min.json" "data.minify.json"
- sha256sum data.minify.json | awk '{print $1}' > rules.minify.hash
artifacts:
paths:
- rules.min.hash
- data.minify.json
- rules.minify.hash
bundle addon:
stage: build
script:
- zip ClearURLs -r -FS clearurls.js browser-polyfill.js manifest.json img/* external_js/* html/* core_js/* css/* fonts/* _locales/*
artifacts:
paths:
- ClearURLs.zip
#bundle addon chrome:
#stage: build
#script:
#- jq 'del(.applications)' manifest.json > manifest.json.tmp && mv manifest.json.tmp manifest.json
#- zip ClearURLs-chrome -r -FS clearurls.js browser-polyfill.js manifest.json img/* external_js/* html/* core_js/* css/* fonts/* _locales/*
#only:
# - master
#artifacts:
# paths:
# - ClearURLs-chrome.zip
pages:
stage: deploy
script:
- mkdir public
- mkdir public/data
- cp img/clearurls.svg public/clearurls.svg
- cp data/data.min.json public/data/data.min.json
- sha256sum public/data/data.min.json | awk '{print $1}' > public/data/rules.min.hash
- node build_tools/minifyDataJSON.js "public/data/data.min.json" "public/data/data.minify.json"
- sha256sum public/data/data.minify.json | awk '{print $1}' > public/data/rules.minify.hash
only:
- master
artifacts:
paths:
- public