Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesvedder committed Jan 22, 2024
1 parent 252482b commit a603790
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 25 deletions.
14 changes: 7 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
12 changes: 6 additions & 6 deletions .github/scripts/generate-uml.bash
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# repo root at ../.. from this file's directory
root=$(realpath $(dirname $(realpath $0))/../..)
root="$(realpath "$(dirname "$(realpath "$0")")/../..")"

docs_dir="$root/docs/uml"

Expand All @@ -16,13 +16,13 @@ prev_update="$(git log -n 1 --pretty=format:%H -- "$docs_dir")"
# regenerated
declare -A dirty
# get all directories that have changed since prev_update
for changed in $(git diff --name-only $prev_update \
for changed in $(git diff --name-only "$prev_update" \
| grep --extended-regexp '(flutter_common|core|designer_v2|app)/lib/.*\.dart' \
| xargs dirname \
| sort --unique \
); do
# set changed dir as dirty for all parents until we reach lib
while [[ -n $(grep --extended-regexp '[^/]*/lib' <<< "$changed") ]]; do
while grep --extended-regexp -q '[^/]*/lib' <<< "$changed"; do
dirty[$changed]=1
changed="$(dirname "$changed")"
done
Expand All @@ -45,10 +45,10 @@ for d in "${!dirty[@]}"; do
echo "Generating diagram for $d"

# ensure destination dir extists
mkdir -p $(dirname "$out")
mkdir -p "$(dirname "$out")"

# go to package dir, i.e. first path component
cd "$root/$(cut -d/ -f1 <<< "$d")"
cd "$root/$(cut -d/ -f1 <<< "$d")" || exit
# uml generator gets confused with generated files so we have to remove
# them
find . -type f -name '*.g.dart' -exec rm {} \;
Expand All @@ -58,7 +58,7 @@ for d in "${!dirty[@]}"; do
--exclude=State --exclude=StatefulWidget --exclude=StatelessWidget \
-b nomnoml \
-s "$(cut -d/ -f2- <<< "$d")" \
> $tmpf
> "$tmpf"
npx --yes nomnoml "$tmpf" "$out"

# get deleted generated files back from git
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
workflowId: 'publish_pubdev.yml'
- name: Get the tag name
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
- name: Checkout code
uses: actions/checkout@v3
- name: Set up ruby env
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
docker compose -f docker/supabase/docker-compose.yml up -d
docker compose -f docker/proxy/docker-compose-proxy.yml up -d
while [ "$(docker inspect --format='{{.State.Health.Status}}' supabase-db)" != "healthy" ]; do sleep 1; done
cat ./database/app_config.sql.example | docker exec -i supabase-db psql -U postgres -d postgres
docker exec -i supabase-db psql -U postgres -d postgres < ./database/app_config.sql.example
- name: Start Chrome Driver
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
workflowId: 'publish_pubdev.yml'
- name: Get the tag name
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
- name: Checkout code
uses: actions/checkout@v3
- name: Decrypt files
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ executing Melos scripts. Use `melos <script>` to run scripts from the
the [Melos documentation](https://melos.invertase.dev/)

When developing locally, you might need to host your own Supabase instance. For
this, follow the instructions [here](/docker/README.md).
this, follow the instructions [here](docker/README.md).

## Repository Overview

Expand Down
2 changes: 1 addition & 1 deletion docker/supabase/scripts/dump_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env_file="../.env"
if [ -f "$env_file" ]; then
# Source the .env file to set environment variables
set -a
# shellcheck source=../.env
# shellcheck disable=SC1090
. "$env_file"
set +a
else
Expand Down
2 changes: 1 addition & 1 deletion docker/supabase/scripts/dump_schema.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env_file="../.env"
if [ -f "$env_file" ]; then
# Source the .env file to set environment variables
set -a
# shellcheck source=../.env
# shellcheck disable=SC1090
. "$env_file"
set +a
else
Expand Down
7 changes: 2 additions & 5 deletions docker/supabase/scripts/execute_sql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ env_file="../.env"
if [ -f "$env_file" ]; then
# Source the .env file to set environment variables
set -a
# shellcheck source=../.env
# shellcheck disable=SC1090
. "$env_file"
set +a
else
Expand Down Expand Up @@ -38,10 +38,7 @@ sql_file="$1"
docker cp "$sql_file" "$POSTGRES_HOST:/tmp/"

# Connect to the PostgreSQL database and execute the SQL file from within the container
docker exec -i "$POSTGRES_HOST" psql -h "$container_ip" -U "$db_username" -d "$POSTGRES_DB" -c "\i /tmp/$(basename "$sql_file")" > execute_supabase_sql_output.txt 2>&1

# Check the exit code to see if the SQL script execution was successful
if [ $? -eq 0 ]; then
if docker exec -i "$POSTGRES_HOST" psql -h "$container_ip" -U "$db_username" -d "$POSTGRES_DB" -c "\i /tmp/$(basename "$sql_file")" > execute_supabase_sql_output.txt 2>&1; then
echo "SQL script executed successfully."
else
echo "SQL script execution failed."
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ update
[`db-docs.yml`](../.github/workflows/db-docs.yml) workflow
- UML diagrams for all dart code in [uml/](uml), organized in directories
analogous to the file structure of the code, generated by the
[`uml-docs.yml`](../.github/workflow/uml-docs.yml) workflow
[`uml-docs.yml`](../.github/workflows/uml-docs.yml) workflow

These documentation updates are committed to your branch while you are working
on it, meaning you should pull and rebase where appropriate to keep a clean
Expand Down

0 comments on commit a603790

Please sign in to comment.