Skip to content

Github action to update version number inside Ada script#131

Merged
hailihu merged 15 commits into
masterfrom
123-provide-reliable-ada---version
Oct 22, 2025
Merged

Github action to update version number inside Ada script#131
hailihu merged 15 commits into
masterfrom
123-provide-reliable-ada---version

Conversation

@onnozweers

Copy link
Copy Markdown
Contributor

Fixes #123

Adding action Update-ada-version.yml that updates the value of ADA_VERSION in the script ada/ada

  • Putting version inside Ada because it releases sysadmins of the burden to roll out a separate file with the version number
  • Less code in Ada (because we don't need to find and read a version file)
  • Sysadmins will have to choose a release to download & install, instead of the latest master branch. But that is good policy anyway.

After creating a new branch, the version is set to the branch name. This will be a separate commit in Github. You may need to pull this commit before pushing changes to that branch, otherwise you may get "Updates were rejected because the remote contains work that you do not have locally".
If you create a branch in Github and then check it out locally, things should be OK.

onnozweers and others added 10 commits October 9, 2025 15:05
Because I need to check if the version update works
Adding the commit hash to the version number was a bad idea, because all the time the remote has a commit extra compared to your local branch. Then you get the error:
"Updates were rejected because the remote contains work that you do not have locally."
You can solve that by doing git push --force, but it's not very convenience (and probably not quite safe) to do that with every push.
@onnozweers onnozweers requested a review from hailihu October 9, 2025 14:17
@onnozweers onnozweers linked an issue Oct 9, 2025 that may be closed by this pull request
@hailihu

hailihu commented Oct 13, 2025

Copy link
Copy Markdown
Contributor

This is a bit difficult to follow, because some of the changes were already directly incorporated in master. Now there is update-version-file.yml and Update-ada-version.yml, should both be used? And there is the file ada-version, should this be removed by this PR?

@onnozweers

Copy link
Copy Markdown
Contributor Author

Hi Haili, apologies for the mess. I'm new to Github actions.

If you agree with this PR, we can remove update-version-file.yml (which is disabled for now) and ada-version. I will do that in this branch.

They are from a previous effort to automate version info

@hailihu hailihu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this is a nice solution for automatic versioning. Just a few comments.

Comment thread .github/workflows/update-ada-version.yml Outdated
Comment thread .github/workflows/update-version-file.yml
Comment thread .github/workflows/update_ada_version.yml
@hailihu

hailihu commented Oct 15, 2025

Copy link
Copy Markdown
Contributor

Hi Haili, apologies for the mess. I'm new to Github actions.

If you agree with this PR, we can remove update-version-file.yml (which is disabled for now) and ada-version. I will do that in this branch.

No problem, just wanted to be sure I understand what is happening.

* Renamed Update-ada-version.yml to update-ada-version.yml, because existing actions don't have capitals in their name either
* Changed sed command to be more compatible with MacOS:
  sed -i expression file ->
  sed expression -i file
…ment unnecessary.

Thanks Haili for reading the documentation :-)
@onnozweers onnozweers requested a review from hailihu October 20, 2025 07:58
@hailihu hailihu merged commit 2dbfbdc into master Oct 22, 2025
2 checks passed
@hailihu hailihu deleted the 123-provide-reliable-ada---version branch October 22, 2025 13:32
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.

Provide reliable ada --version way

2 participants