2019-02-12 23:33:40 +00:00
|
|
|
image: debian:latest
|
|
|
|
|
2019-03-12 17:13:23 +00:00
|
|
|
before_script:
|
2019-02-12 23:38:39 +00:00
|
|
|
- export DEBIAN_FRONTEND= noninteractive
|
|
|
|
- apt-get update -y
|
2019-11-09 00:41:42 +00:00
|
|
|
- apt-get install -y zip unzip jq nodejs
|
2019-02-12 23:30:36 +00:00
|
|
|
|
2019-03-12 17:13:23 +00:00
|
|
|
stages:
|
2019-02-12 23:30:36 +00:00
|
|
|
- build
|
2019-09-24 16:24:22 +00:00
|
|
|
- deploy
|
2019-02-12 23:30:36 +00:00
|
|
|
|
2019-11-15 21:56:26 +00:00
|
|
|
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
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
|
2019-03-12 17:13:23 +00:00
|
|
|
build firefox:
|
2019-02-12 23:30:36 +00:00
|
|
|
stage: build
|
|
|
|
script:
|
2019-02-12 23:56:48 +00:00
|
|
|
- zip ClearUrls_firefox -r -FS clearurls.js browser-polyfill.js manifest.json img/* external_js/* html/* core_js/* css/* fonts/* _locales/*
|
2019-02-12 23:30:36 +00:00
|
|
|
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
|
|
|
|
artifacts:
|
|
|
|
paths:
|
2019-02-12 23:56:48 +00:00
|
|
|
- ClearUrls_firefox.zip
|
2019-02-12 23:30:36 +00:00
|
|
|
|
2019-03-12 17:13:23 +00:00
|
|
|
build chrome:
|
2019-02-12 23:30:36 +00:00
|
|
|
stage: build
|
|
|
|
script:
|
2019-04-01 22:16:32 +00:00
|
|
|
- jq 'del(.applications) | .description=""' 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/*
|
2019-02-12 23:30:36 +00:00
|
|
|
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
|
|
|
|
artifacts:
|
|
|
|
paths:
|
2019-03-12 17:13:23 +00:00
|
|
|
- ClearUrls_chrome.zip
|
2019-09-24 16:16:54 +00:00
|
|
|
|
|
|
|
pages:
|
2019-09-24 16:23:06 +00:00
|
|
|
stage: deploy
|
|
|
|
script:
|
|
|
|
- mkdir public
|
2019-11-15 20:45:43 +00:00
|
|
|
- mkdir public/data
|
2019-09-24 16:23:06 +00:00
|
|
|
- mv GitLabPages/* public/
|
2019-09-24 16:35:33 +00:00
|
|
|
- cp img/clearurls.svg public/clearurls.svg
|
2019-11-15 20:43:58 +00:00
|
|
|
- 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
|
2019-09-24 16:23:06 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|
2019-11-15 20:26:57 +00:00
|
|
|
only:
|
|
|
|
- master
|