fix: start script unbound variables [skip ci]

This commit is contained in:
Nicolas Meienberger 2022-11-01 08:24:01 +01:00
parent 6805dcd9f5
commit 30bcb47c0a
6 changed files with 19 additions and 19 deletions

View file

@ -145,7 +145,7 @@ Available settings:
- `listenIp` - The IP address to listen on. Default: `automatically detected`
- `storagePath` - The path to use for storing data. Default: `runtipi/app-data`
## Linking a domain to your dashboard
### Linking a domain to your dashboard
If you want to link a domain to your dashboard, you can do so by providing the `--domain` option in the start script.
@ -171,6 +171,10 @@ cd ..
sudo rm -rf runtipi
```
## 📚 Documentation
You can find more documentation and tutorials / FAQ in the [Wiki](https://github.com/meienberger/runtipi/wiki).
## ❤️ Contributing
Tipi is made to be very easy to plug in new apps. We welcome and appreciate new contributions.

View file

@ -1,6 +1,5 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
preset: 'ts-jest',
verbose: true,
// testEnvironment: 'node',
testMatch: ['**/__tests__/**/*.test.ts'],

View file

@ -497,7 +497,7 @@ describe('List apps', () => {
it('Should list apps that have no supportedArchitectures specified', async () => {
// Arrange
setConfig('architecture', AppSupportedArchitecturesEnum.ARM);
const app3 = await createApp({});
const app3 = await createApp({ supportedArchitectures: undefined });
// @ts-ignore
fs.__createMockFiles(Object.assign(app3.MockFiles));

View file

@ -159,19 +159,16 @@ const listApps = async (): Promise<ListAppsResonse> => {
const apps: AppInfo[] = folders
.map((app) => {
try {
return readJsonFile(`/runtipi/repos/${getConfig().appsRepoId}/apps/${app}/config.json`);
} catch (e) {
return null;
}
return readJsonFile(`/runtipi/repos/${getConfig().appsRepoId}/apps/${app}/config.json`);
})
.filter(Boolean);
apps.forEach((app) => {
app.description = readFile(`/runtipi/repos/${getConfig().appsRepoId}/apps/${app.id}/metadata/description.md`);
const filteredApps = filterApps(apps).map((app) => {
const description = readFile(`/runtipi/repos/${getConfig().appsRepoId}/apps/${app.id}/metadata/description.md`);
return { ...app, description };
});
return { apps: filterApps(apps), total: apps.length };
return { apps: filteredApps, total: apps.length };
};
/**

2
pnpm-lock.yaml generated
View file

@ -6285,7 +6285,7 @@ packages:
eslint-import-resolver-webpack:
optional: true
dependencies:
'@typescript-eslint/parser': 5.22.0_hcfsmds2fshutdssjqluwm76uu
'@typescript-eslint/parser': 5.22.0_uhoeudlwl7kc47h4kncsfowede
debug: 3.2.7
eslint-import-resolver-node: 0.3.6
find-up: 2.1.0

View file

@ -84,12 +84,12 @@ fi
### --------------------------------
### CLI arguments
### --------------------------------
while [ -n "$1" ]; do
while [ -n "${1-}" ]; do
case "$1" in
--rc) rc="true" ;;
--ci) ci="true" ;;
--port)
port="$2"
port="${2-}"
if [[ "${port}" =~ ^[0-9]+$ ]]; then
NGINX_PORT="${port}"
@ -100,7 +100,7 @@ while [ -n "$1" ]; do
shift
;;
--ssl-port)
ssl_port="$2"
ssl_port="${2-}"
if [[ "${ssl_port}" =~ ^[0-9]+$ ]]; then
NGINX_PORT_SSL="${ssl_port}"
@ -111,7 +111,7 @@ while [ -n "$1" ]; do
shift
;;
--domain)
domain="$2"
domain="${2-}"
if [[ "${domain}" =~ ^[a-zA-Z0-9.-]+$ ]]; then
DOMAIN="${domain}"
@ -122,7 +122,7 @@ while [ -n "$1" ]; do
shift
;;
--listen-ip)
listen_ip="$2"
listen_ip="${2-}"
if [[ "${listen_ip}" =~ ^[a-fA-F0-9.:]+$ ]]; then
INTERNAL_IP="${listen_ip}"
@ -234,9 +234,9 @@ mv -f "$ENV_FILE" "$ROOT_FOLDER/.env"
### --------------------------------
### Start the project
### --------------------------------
if [[ ! $ci == "true" ]]; then
if [[ ! "${ci-false}" == "true" ]]; then
if [[ $rc == "true" ]]; then
if [[ "${rc-false}" == "true" ]]; then
docker compose -f docker-compose.rc.yml --env-file "${ROOT_FOLDER}/.env" pull
# Run docker compose
docker compose -f docker-compose.rc.yml --env-file "${ROOT_FOLDER}/.env" up --detach --remove-orphans --build || {