Skip to content

Commit 5ce447c

Browse files
Saby-Bishopsdogi
andauthored
actions: less couchdb setup is more (fixes #9912) (#9778)
Co-authored-by: dogi <dogi@users.noreply.github.com>
1 parent 89c7b78 commit 5ce447c

2 files changed

Lines changed: 1 addition & 27 deletions

File tree

couchdb-setup.sh

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ upsert_doc() {
1818
fi
1919
}
2020

21-
# Function for insert mock data docs
22-
insert_docs() {
23-
DB=$1
24-
DOC_LOC=$2
25-
curl -H 'Content-Type: application/json' -X POST $COUCHURL/$DB/_bulk_docs -d @$DOC_LOC $PROXYHEADER
26-
}
27-
2821
# Function to add databases
2922
insert_dbs() {
3023
DBS=$1
@@ -68,25 +61,6 @@ else
6861
COUCHURL=http://$COUCHUSER:$COUCHPASSWORD@$HOST:$PORT
6962
fi
7063

71-
# Adding attachments to database documents
72-
# To add attachment added two file (resources-mock.json and resources-attachment-mockup.json)
73-
# Ids must match between two files
74-
insert_attachments() {
75-
DB=$1
76-
DOC_LOC=$2
77-
# Use echo $(<$DOC_LOC) to be able to run in Windows
78-
INPUTS=$(echo $(<$DOC_LOC) | jq -c '.[]')
79-
for i in $INPUTS
80-
do
81-
ID=$(echo $i | jq -r '.doc_id' )
82-
FILE_NAME=$(echo $i | jq -r '.file_name')
83-
FILE_LOCATION=$(echo $i | jq -r '.file_location')
84-
FILE_TYPE=$(echo $i | jq -r '.file_type')
85-
REV=$(curl $COUCHURL/$DB/$ID | jq -r '._rev' $PROXYHEADER)
86-
curl -X PUT $COUCHURL/$DB/$ID/$FILE_NAME?rev=$REV --data-binary @$FILE_LOCATION -H Content-Type:$FILE_TYPE $PROXYHEADER
87-
done
88-
}
89-
9064
# Reads one JSON file to update multiple databases
9165
# JSON file needs a 'dbName' field with a string and
9266
# a 'json' field with the JSON to be updated

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "planet",
33
"license": "AGPL-3.0",
4-
"version": "0.22.65",
4+
"version": "0.22.66",
55
"myplanet": {
66
"latest": "v0.54.54",
77
"min": "v0.52.45"

0 commit comments

Comments
 (0)