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

feat(publish): change to use version from env var #20

Merged
merged 2 commits into from
Mar 14, 2024
Merged

Conversation

alissonperez
Copy link
Owner

@alissonperez alissonperez commented Mar 14, 2024

What was done?

In this PR, the versioning system was changed to use the version from the environment variable. The __version__.py file was deleted and the version is now fetched from the environment variable in setup.py. Also, the Github workflow was updated to determine the version from the tag and pass it as an environment variable to the make publish command.

Maintaining __version__.py is not the best aproach here due to that it's easy to forget to change it before creating a release. It's better to just use an env var to fetch the right application version.

How was it done?

The changes were made in the setup.py file and the .github/workflows/release.yaml file. In setup.py, the version is now fetched from the environment variable. If the version is not found, an exception is raised. In the Github workflow, a new step was added to determine the version from the tag and pass it as an environment variable to the make publish command.

How was it tested?

The changes were tested by running the Github workflow and ensuring that the version is correctly fetched from the environment variable and the make publish command works as expected.

@alissonperez alissonperez self-assigned this Mar 14, 2024
@alissonperez alissonperez merged commit 6a8be60 into main Mar 14, 2024
1 check passed
@alissonperez alissonperez deleted the fix/version branch March 14, 2024 02:04
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.

1 participant