@webship.co/workspace-demos 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -18,4 +18,17 @@ shift $#;
|
|
|
18
18
|
trim_project_name ; # "v11x00b1/" -> "v11x00b1" — see functions/fun-project-name.sh
|
|
19
19
|
|
|
20
20
|
backup_workspace_item "${PROJECT_NAME}" || exit 1 ;
|
|
21
|
-
|
|
21
|
+
|
|
22
|
+
# The database goes beside the archive. A project that runs without one (an Astro or Gatsby site:
|
|
23
|
+
# omit_containers: [db]) has only its files to back up; ddev export-db would fail on it and leave
|
|
24
|
+
# an empty dump behind, which a restore then tries to import.
|
|
25
|
+
dump="${backups}/${doc_name}/${doc_name}---${PROJECT_NAME}--${BACKUP_TIME}-db.sql.gz" ;
|
|
26
|
+
if grep -qsE '^omit_containers:.*\bdb\b' ${PROJECT_NAME}/.ddev/config.yaml ${PROJECT_NAME}/.ddev/config.*.yaml ; then
|
|
27
|
+
echo "${PROJECT_NAME} runs without a database: its files are backed up, and there is no database to export." ;
|
|
28
|
+
exit 0 ;
|
|
29
|
+
fi
|
|
30
|
+
if ! (cd ${PROJECT_NAME} && ddev export-db --file="${dump}") ; then
|
|
31
|
+
[ -s "${dump}" ] || rm -f "${dump}" ;
|
|
32
|
+
echo "The database of ${PROJECT_NAME} could not be exported: only its files are backed up." ;
|
|
33
|
+
exit 1 ;
|
|
34
|
+
fi
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webship.co/workspace-demos",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "The Demos workspace for Webship Workspace: the `demos/` folder (type sites), its settings file, its 27 commands, its docs and its AI items (an agent, a skill, a command and a prompt, each in the folder of its kind), activated as a plugin.",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|