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

chore: Reduce duplicities in configuration #284

Merged
merged 9 commits into from
Jul 21, 2023

Conversation

ctasada
Copy link
Collaborator

@ctasada ctasada commented Jul 11, 2023

With the recent changes in #267 now is possible to reduce duplication of values.

Now the version is reduced to a single build.gradle configuration. Same for other module configurations that are also unified.

While testing I also found some unneeded variables in dependencies.gradle and some unusedDeclaredArtifacts which are also fixed.

Each change is in its own commit to allow for easier review.

@netlify
Copy link

netlify bot commented Jul 11, 2023

Deploy Preview for springwolf-ui canceled.

Name Link
🔨 Latest commit b06abd9
🔍 Latest deploy log https://app.netlify.com/sites/springwolf-ui/deploys/64ba8ea588f52d0008041e0a

Carlos Tasada added 6 commits July 11, 2023 18:26
Some `dependencies.gradle` variables were no longer used.
Now that all the modules are aligned, we can define the version a single time.
```
Execution failed for task ':analyzeClassesDependencies'.
> Dependency analysis found issues.
  unusedDeclaredArtifacts:
```

Some dependencies were not used or were used, but wrongly identified as not used.
Move the Java version definition to the project's root
Centralize the Maven publishing configuration to remove duplicated configuration.
Centralize the Signing configuration to remove duplicated configuration.
@ctasada ctasada force-pushed the ctasada/gradle-improvements branch from f75e22e to 8a4b07d Compare July 11, 2023 16:26
Centralize the version value used in the `docker-compose`
@ctasada ctasada force-pushed the ctasada/gradle-improvements branch from 8a4b07d to c8b6876 Compare July 12, 2023 08:05
@timonback
Copy link
Member

Hi @ctasada,
I like the change to reduce the amount of version string sprinkled around in this repo.

I like to keep the information whether it is a snapshot separate from SPRINGWOLF_VERSION, because I can be sure in the pipeline that builds on master will never build release version.

What I am currently unsure about is how to handle bugfix releases.
Assuming we release 0.13.0 and incremented to the next version 0.14.0. Now, we discover something requiring a bugfix aka small release 0.13.1. What to do?
Fix it in 0.14.0, cherry-pick backport it to a new branch created from the 0.13.0 tag (with increasing the version to 0.13.1 on the newly created branch first)?

Now that we have the `docker-compose.yaml` files reading from a `.env` file, we can use the same file to configure Gradle. This provides a single point to configure the version for the whole project.
@ctasada ctasada force-pushed the ctasada/gradle-improvements branch from d83fb9b to da5bb47 Compare July 18, 2023 10:41
@ctasada
Copy link
Collaborator Author

ctasada commented Jul 18, 2023

@timonback Regarding the bug fixing after releases I think the best approach is to link the release with a tag.

I see 2 ways of accomplishing it:
1.- Modify the Github workflow in a way that once the release is generated, it also creates a git tag This will allow to checkout and build a new tag with any needed bugfix in the future
2.- Modify the Github workflow so the release process is directly related to the tag creation. So once a new tag is created, the libraries release is executed and the version is updated.

Both approaches accomplish the same outcome, but are implemented in slightly different ways. I see that Github has different workflows in the marketplace that accomplish this. I have used both approaches with Gitlab for years and they work fine. The decision is mainly driven by minor tradeoffs and deployment preferences.

@sam0r040 sam0r040 merged commit e048250 into springwolf:master Jul 21, 2023
timonback added a commit to timonback/springwolf-core that referenced this pull request Jul 23, 2023
sam0r040 pushed a commit that referenced this pull request Jul 28, 2023
* chore: Simplify handling of SNAPSHOT versions

Continuation of #284
After suggested in #284 (comment)

* chore: Simplify publish-releases pipeline
@ctasada ctasada deleted the ctasada/gradle-improvements branch December 13, 2023 17:05
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.

3 participants