-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sh
executable file
·55 lines (47 loc) · 1.78 KB
/
build.sh
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
#!/bin/bash
set -e
# Release-dance code goes here.
# Constants
PRODUCT="Propachi: CSL processor monkey-patch for Zotero (uppercase subtitles)"
IS_BETA="false"
FORK="propachi-upper"
BRANCH="master"
CLIENT="propachi-upper"
VERSION_ROOT="1.1."
SIGNED_STUB="propachi_patch_zotero_csl_processor_upper_ver-"
function xx-fetch-latest-processor () {
cd "${SCRIPT_DIR}"
cd ../citeproc-js
./test.py -B
cp citeproc.js "${SCRIPT_DIR}/chrome/content/citeproc.js"
sed -si 's/this\.development_extensions\.main_title_from_short_title = false/this\.development_extensions\.main_title_from_short_title = true/' "${SCRIPT_DIR}/chrome/content/citeproc.js"
sed -si 's/this\.development_extensions\.uppercase_subtitles = false/this\.development_extensions\.uppercase_subtitles = true/' "${SCRIPT_DIR}/chrome/content/citeproc.js"
cd "${SCRIPT_DIR}"
}
function xx-read-version-from-processor-code () {
PROCESSOR_VERSION=$(cat "chrome/content/citeproc.js" | grep "PROCESSOR_VERSION:" | sed -e "s/.*PROCESSOR_VERSION:[^0-9]*\([.0-9]\+\).*/\1/")
}
function xx-make-the-bundle () {
find . -name '.hg' -prune -o \
-name '.hgignore' -prune -o \
-name '.gitmodules' -prune -o \
-name '*~' -prune -o \
-name '.git' -prune -o \
-name 'attic' -prune -o \
-name '.hgsub' -prune -o \
-name '.hgsubstate' -prune -o \
-name '*.bak' -prune -o \
-name 'version' -prune -o \
-name 'releases' -prune -o \
-name 'sh-lib' -prune -o \
-name 'build.sh' -prune -o \
-print \
| xargs zip "${XPI_FILE}" >> "${LOG_FILE}"
}
function build-the-plugin () {
set-install-version
xx-fetch-latest-processor
xx-read-version-from-processor-code
xx-make-the-bundle
}
. jm-sh/frontend.sh