#!/usr/bin/env sh

branch="$(git rev-parse --abbrev-ref HEAD)"

if [ "$branch" == "main" ]; then
  echo "You cannot commt directly to main branch"
  exit 1
fi

flutter pub run build_runner build --delete-conflicting-outputs
dartfmt -w ./lib/**/*.dart

flutter analyze --no-fatal-infos --no-fatal-warnings

if [ command -v ktlint &> /dev/null ]; then
fi

if [ command -v swiftlint &> /dev/null && "$OSTYPE" == "darwin"* ]; then
fi
