Skip to content

Commit

Permalink
Debug why robots.txt was generated
Browse files Browse the repository at this point in the history
  • Loading branch information
simolus3 committed Oct 16, 2024
1 parent 3c11432 commit a01d35e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
working-directory: .
- name: Run build
env:
IS_RELEASE: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/latest-release' }}
IS_RELEASE: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/fix-docs' }}
run: |
chmod +x ./docs.sh
./docs.sh build
Expand Down
9 changes: 7 additions & 2 deletions docs/docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,13 @@ if [ $arg1 == "build" ]; then

# If the environmental value IS_RELEASE is set to true, then DONT generate the robots.txt file
if [ "$IS_RELEASE" != "true" ]; then
echo "Not a release build, set IS_RELEASE to true to allow crawling."
echo "User-agent: *" > ./web/robots.txt
echo "Disallow: /" >> ./web/robots.txt
else
echo "Release build!"
echo "User-agent: *" > ./web/robots.txt
echo "Disallow:" >> ./web/robots.txt
fi


Expand Down Expand Up @@ -127,14 +132,14 @@ elif [ $arg1 == "serve" ]; then

drift_dev

dart run build_runner build --delete-conflicting-outputs
dart run build_runner build --delete-conflicting-outputs
if [ $? -ne 0 ]; then
echo "Failed to build the project"
exit 1
fi

run_webdev

build_container

serve_mkdocs &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class GeneratedHelper implements SchemaInstantiationHelper {
case 3:
return v3.DatabaseAtV3(db);
default:
throw MissingSchemaException(version, const {1, 2, 3});
throw MissingSchemaException(version, versions);
}
}

static const versions = const [1, 2, 3];
}

0 comments on commit a01d35e

Please sign in to comment.