From a01d35e0b69023f8aa2e29470c14687379a24d1e Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Wed, 16 Oct 2024 17:55:11 +0200 Subject: [PATCH] Debug why robots.txt was generated --- .github/workflows/main.yml | 2 +- docs/docs.sh | 9 +++++++-- .../migrations/tests/generated_migrations/schema.dart | 4 +++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3cca82dd4..f3c417ffc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/docs/docs.sh b/docs/docs.sh index 9dd7b3bb9..b840ac588 100755 --- a/docs/docs.sh +++ b/docs/docs.sh @@ -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 @@ -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 & diff --git a/docs/lib/snippets/migrations/tests/generated_migrations/schema.dart b/docs/lib/snippets/migrations/tests/generated_migrations/schema.dart index 1c9347e90..558b6dafa 100644 --- a/docs/lib/snippets/migrations/tests/generated_migrations/schema.dart +++ b/docs/lib/snippets/migrations/tests/generated_migrations/schema.dart @@ -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]; }