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

Using Replace-DependenciesInAppFile.ps1 ReplaceVersionNumber to check on breaking changes rules in AppSourceCop #3748

Open
SjoerddeClippelaar opened this issue Nov 4, 2024 · 4 comments
Assignees

Comments

@SjoerddeClippelaar
Copy link

Dear Freddy,

We are using AppSourceCop in our pipelines to validate Pull Request on breaking changes. During the run we change to AppSourceCop.json file and run CompileAppInBCContainer, which works great.

BUT we also want to give errors on breaking changes locally, but we don't want to change the version from the app in de AppSourceCop.json file every time we complete a pull request.

In the BcContainerHelper you created this Replace-DependenciesInAppFile function that we wanted to use to create a major.minor.1.1 app file. So we don't have to change the settings file. We can successfully create a app file with a new number, but AppSourceCop can't find the file anymore.

Image

Are we missing something? Or can you explain for what reason this ReplaceVersionNumber is used? Or do you expect it should work?

Thank you for your reply

@freddydk
Copy link
Contributor

freddydk commented Nov 5, 2024

I don't understand why you would have to modify the version number in the previous release?
AL-Go for GitHub automatically grabs the latest released version and uses that for breaking changes check without any of those workarounds.

@SjoerddeClippelaar
Copy link
Author

Hi Freddy, thank you for your fast reply. We would like to see breaking errors also in our VSCode when programming. If we don't change the versionnr. We need to change it in the AppSourceCop.json file everytime we run a CI build, that is unwanted, because it is not part of the original commit.

Like I said we already fixed it in our DevOps pipeline, so that works fine.

You think you can help us?

@freddydk
Copy link
Contributor

freddydk commented Nov 5, 2024

The way we handle this in AL-Go is to update app.json with a new major or minor versoin whenever we release a version - and then we use the released version for breaking change validation. If the replace-dependencies with a version number change doesn't work for you, you could maybe change the release process yourself?

@SjoerddeClippelaar
Copy link
Author

Yeah we do the same in the DevOps pipeline. Before we compile we have the previous version. Change the number in the AppSourceCop.json and check on breaking changes. But we didn't want to commit that change, because it is not part of the original commit the developer pushed.

So we probably end up only checking for breaking changes in the DevOps pipeline and not locally in VSCode. Thank you.

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

No branches or pull requests

2 participants