Skip to content

Commit

Permalink
Allow crawling for release docs builds
Browse files Browse the repository at this point in the history
  • Loading branch information
simolus3 committed Oct 16, 2024
1 parent 3c11432 commit 6c1edb7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
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 6c1edb7

Please sign in to comment.