Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Built-in script to check if generated file is up-to-date #64

Open
kubk opened this issue Jun 28, 2023 · 0 comments
Open

Built-in script to check if generated file is up-to-date #64

kubk opened this issue Jun 28, 2023 · 0 comments

Comments

@kubk
Copy link
Collaborator

kubk commented Jun 28, 2023

Currently the following bash can be used:

#!/bin/bash

set -e

GENERATED_FILE=generated.dart
PREV_GENERATED_FILE=current-generated.dart

cp $GENERATED_FILE $PREV_GENERATED_FILE
bin/php-converter.phar --from=./src --to=./ --config=./config/php-converter/dart-config.php

if diff -q $PREV_GENERATED_FILE $GENERATED_FILE; then
  echo "DTO ok"
  rm $PREV_GENERATED_FILE
else
  echo "Dto mismatch"
  rm $PREV_GENERATED_FILE
  exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant