Skip to content

Commit

Permalink
ignore the apis info file
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisho committed Jul 28, 2023
1 parent e963d4c commit 9be9bf4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ steps:
path: /var/run/docker.sock

- name: preview
image: chhooo/drone-netlify:v0.1.1
image: ghcr.io/harvester/drone-netlify:master
environment:
BUILD_ZIP_FILE: "build.zip"
NETLIFY_AUTH_TOKEN:
Expand Down
6 changes: 5 additions & 1 deletion scripts/ignore-openapi
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ if echo "$FILES" | grep -q "api/swagger.json"; then
# perform re-generate and check for dirty files
yarn clean-api-docs all
yarn gen-api-docs all
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
dirty_files=$(git status --porcelain --untracked-files=no)
lines_count=$(echo "$dirty_files" | wc -l)
if [ "$lines_count" -gt 1 ] || { [ "$lines_count" -eq 1 ] && [[ "$dirty_files" != *"harvester-apis.info.mdx"* ]]; }; then
echo "Error: Found dirty files. Please resolve the issues before continuing."
exit 1
fi

git reset --hard HEAD
exit 0
fi

Expand Down

0 comments on commit 9be9bf4

Please sign in to comment.