| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,20 +1,36 @@ | |||
| 1 | - ADAPTERS="adminforth-completion-adapter-open-ai-chat-gpt adminforth-email-adapter-aws-ses adminforth-google-oauth-adapter adminforth-github-oauth-adapter" | ||
| 1 | + #!/usr/bin/env bash | ||
| 2 | + ADAPTERS="adminforth-completion-adapter-open-ai-chat-gpt adminforth-email-adapter-aws-ses adminforth-google-oauth-adapter adminforth-github-oauth-adapter adminforth-facebook-oauth-adapter adminforth-keycloak-oauth-adapter" | ||
| 2 | 3 | ||
| 3 | - # for each plugin | ||
| 4 | - for adapter in $ADAPTERS; do | ||
| 4 | + # for each | ||
| 5 | + install_adapter() { | ||
| 6 | + adapter=$1 | ||
| 5 | 7 | ||
| 6 | 8 | if [ -d "$adapter/.git" ]; then | |
| 7 | 9 | echo "Repository for $adapter exists. Pulling latest changes..." | |
| 8 | 10 | cd "$adapter" | |
| 9 | 11 | git pull | |
| 10 | 12 | else | |
| 11 | 13 | echo "Repository for $adapter does not exist. Cloning..." | |
| 12 | - git clone git@github.com:devforth/$adapter.git | ||
| 13 | - cd $adapter | ||
| 14 | + git clone git@github.com:devforth/$adapter.git "$adapter" | ||
| 15 | + cd "$adapter" | ||
| 14 | 16 | fi | |
| 15 | - | ||
| 17 | + | ||
| 16 | 18 | npm ci | |
| 17 | 19 | cd .. | |
| 18 | - done | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + do_npm_ci() { | ||
| 23 | + adapter=$1 | ||
| 24 | + cd "$adapter" | ||
| 25 | + npm ci | ||
| 26 | + cd .. | ||
| 27 | + } | ||
| 19 | 28 | ||
| 29 | + export -f install_adapter | ||
| 30 | + export -f do_npm_ci | ||
| 20 | 31 | ||
| 32 | + echo $ADAPTERS | tr ' ' '\n' | xargs -P 0 -I {} bash -c 'install_adapter "$@"' _ {} | ||
| 33 | + | ||
| 34 | + echo $ADAPTERS | tr ' ' '\n' | while read adapter; do | ||
| 35 | + do_npm_ci "$adapter" | ||
| 36 | + done | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -138,6 +138,7 @@ columns: [ | |||
| 138 | 138 | ... | |
| 139 | 139 | ] | |
| 140 | 140 | ``` | |
| 141 | + | ||
| 141 | 142 | This way, when admin selects, for example, "Luxury" option for "Apartment Type" filter, it will be replace with a more complex "or" filter. | |
| 142 | 143 | ||
| 143 | 144 | ### Custom SQL queries with `insecureRawSQL` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,8 +21,8 @@ | |||
| 21 | 21 | "docs": "typedoc", | |
| 22 | 22 | "--comment_postinstall": "postinstall executed after package installed in other project package and when we do npm ci in the package", | |
| 23 | 23 | "postinstall": "if test -d ./dist/spa/; then cd ./dist/spa/ && npm ci && echo 'installed spa dependencies'; fi", | |
| 24 | - "install-plugins": "cd ../plugins && sh install-plugins.sh", | ||
| 25 | - "install-adapters": "cd ../adapters && sh install-adapters.sh" | ||
| 24 | + "install-plugins": "cd ../plugins && bash install-plugins.sh", | ||
| 25 | + "install-adapters": "cd ../adapters && bash install-adapters.sh" | ||
| 26 | 26 | }, | |
| 27 | 27 | "release": { | |
| 28 | 28 | "plugins": [ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,23 +1,38 @@ | |||
| 1 | + #!/usr/bin/env bash | ||
| 1 | 2 | PLUGINS="adminforth-audit-log adminforth-email-password-reset adminforth-foreign-inline-list \ | |
| 2 | 3 | adminforth-i18n adminforth-import-export adminforth-text-complete adminforth-open-signup \ | |
| 3 | 4 | adminforth-rich-editor adminforth-two-factors-auth adminforth-upload adminforth-oauth \ | |
| 4 | 5 | adminforth-list-in-place-edit adminforth-inline-create" | |
| 5 | 6 | ||
| 6 | - # for each plugin | ||
| 7 | - for plugin in $PLUGINS; do | ||
| 7 | + # Function to install a plugin | ||
| 8 | + install_plugin() { | ||
| 9 | + plugin=$1 | ||
| 8 | 10 | ||
| 9 | 11 | if [ -d "$plugin/.git" ]; then | |
| 10 | 12 | echo "Repository for $plugin exists. Pulling latest changes..." | |
| 11 | 13 | cd "$plugin" | |
| 12 | 14 | git pull | |
| 13 | 15 | else | |
| 14 | 16 | echo "Repository for $plugin does not exist. Cloning..." | |
| 15 | - git clone git@github.com:devforth/$plugin.git | ||
| 16 | - cd $plugin | ||
| 17 | + git clone git@github.com:devforth/$plugin.git "$plugin" | ||
| 18 | + cd "$plugin" | ||
| 17 | 19 | fi | |
| 18 | - | ||
| 20 | + | ||
| 21 | + cd .. | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + do_npm_ci() { | ||
| 25 | + plugin=$1 | ||
| 26 | + cd "$plugin" | ||
| 19 | 27 | npm ci | |
| 20 | 28 | cd .. | |
| 21 | - done | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + export -f install_plugin | ||
| 32 | + export -f do_npm_ci | ||
| 22 | 33 | ||
| 34 | + echo $PLUGINS | tr ' ' '\n' | xargs -P 0 -I {} bash -c 'install_plugin "$@"' _ {} | ||
| 23 | 35 | ||
| 36 | + echo $PLUGINS | tr ' ' '\n' | while read plugin; do | ||
| 37 | + do_npm_ci "$plugin" | ||
| 38 | + done | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments