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

CI should check that generated code has been committed #127

Merged
merged 3 commits into from Oct 16, 2018

Conversation

jonny-improbable
Copy link
Contributor

Add a travis build step which re-generates the generated code and then checks for changes to the workspce. If any are detected it will fail the build and prompt the user to run the ./generate.sh script.

Add a travis build step which re-generates the generated code and then checks for changes to the workspce. If any are detected it will fail the build and prompt the user to run the `./generate.sh` script.
@jonnyreeves
Copy link
Contributor

Pretty sure we are seeing these errors because it's the first time this script has been executed on Travis.

I'll try switching to using unzip instead of tar

./generate.sh
MODIFIED_FILES=$(git diff --name-only)
if [[ -n $MODIFIED_FILES ]]; then
echo "ERROR: Changes detected in generated code, please run './generate.sh' and check-in the changes."
Copy link
Contributor

@easyCZ easyCZ Oct 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will unfortunately NOT be invisible to our users and hence they won't be able to self-fix this. Not sure if we have a fix for this. We could make the project visible but not modifiable to the public?

@jonny-improbable jonny-improbable merged commit b7267ea into master Oct 16, 2018
@jonny-improbable jonny-improbable deleted the bugfix/126-check-generated-code branch October 16, 2018 14:04
coltonmorris pushed a commit to coltonmorris/ts-protoc-gen that referenced this pull request Oct 17, 2018
* upstream/master:
  Transport member of ServiceClientOptions should be optional (improbable-eng#125)
  Allow canceling unary calls (improbable-eng#124)
  CI should check that generated code has been committed (improbable-eng#127)
  Bumped to v0.7.8-pre (improbable-eng#123)
  Prepare 0.7.7 release (improbable-eng#112)
  Clean up Bazel Installation during Travis Build (improbable-eng#122)
  Don't deploy .deb files to npm (improbable-eng#121)
  Fix snake_cased oneof message are generated to incorrect types (improbable-eng#118)
  Make ServiceError optionally null (improbable-eng#116)
  Be explicit about the need for a CommonJS environment. (improbable-eng#108)
  Replace usage of `Object.assign` (improbable-eng#110)
  Add hint for Windows users (improbable-eng#107)
  Collapse Bazel Instructions in README (improbable-eng#106)
  Implement Client Streaming and BiDi Streaming for grpc-web (improbable-eng#82)
  Add support for jstype annotation (improbable-eng#104)
chrisgervang pushed a commit to chrisgervang/flowtype-protoc-gen that referenced this pull request Nov 14, 2018
…g#127)

* CI should check that generated code has been committed

Add a travis build step which re-generates the generated code and then checks for changes to the workspce. If any are detected it will fail the build and prompt the user to run the `./generate.sh` script.

* Patch up generation script so it can be invoked from another script.

* Use unzip instead of tar.
chrisgervang added a commit to chrisgervang/flowtype-protoc-gen that referenced this pull request Nov 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants