File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash -eu
2+
3+ # Download a pouchdb production build for testing inter-version migrations in
4+ # tests/integration/browser.migration.js
5+
6+ log () {
7+ echo " [get-postfixed-pouchdb-build] $* "
8+ }
9+
10+ # Recently, postfixed JS files have been added in minified form.
11+ infix=" .min"
12+ while [[ $# -gt 1 ]]; do
13+ if [[ $1 = --no-minify ]]; then
14+ infix=" "
15+ else
16+ echo " !!! Unrecognised arg: $1 "
17+ exit 1
18+ fi
19+ shift
20+ done
21+
22+ version=" $1 "
23+ target=" ./pouchdb-$version -postfixed.js"
24+ nodots=" $( tr -d . <<< " $version" ) "
25+ tmp=" $( mktemp) "
26+
27+ log " Fetching minified pouch build..."
28+ wget " https://github.com/pouchdb/pouchdb/releases/download/$version /pouchdb-${version}${infix} .js" --output-document=" $tmp "
29+
30+ log " Converting globals..."
31+ sed " s/PouchDB/PouchDBVersion$nodots /g" " $tmp " > " $target "
32+
33+ log " Completed OK."
You can’t perform that action at this time.
0 commit comments