This subforum is specifically to discuss packaging issues on different platforms (windows, mac, linux), and using different packaging systems (conda, etc...)
As I am running into difficulties with using git to fetch the source code of freecad, I would like to try a separate step to create daily source releases with an additional version file that contains the necessary git-information.
The github action to generate the version file and the compressed source code is already done. My question now is, how to use the version-file in the build process? And which information do we need? Currently the version file looks like this:
Is it possible to create the version.hxx file within the GitHub action? I guess all information should be available. So the task is about inserting this information into the version.hxx file. But I am not sure how it is done currently. @wmayer can you briefly explain how this process is currently done with cake?
question about versioning in general, wouldn't it be better to explicitly name it 0.20.0.xxxxx? this way keeping track of what is newer can be more simple with future point releases (for example 0.20.27000 can be interpreted by software as a newer version than 0.20.1.27010 since 27000>>1)
The Version.h file will be created when running the build process by executing the Python script SubWCRev.py.
At the times when we used automake & friends there was a target make dist to create source tarballs. With the move to CMake the creation of clean source tarballs have become way more difficult because you need to maintain a blacklist of files you don't want to be added. And this is impossible to do reliably because you have no control of which files you have in the source directory.
Luckily with the move from svn to git we can use the fact that it will ignore all files that are no part of the repository and additionally with .gitattributes we can ignore certain files of the repository.
To create source tarballs this way I once wrote the script makedist.py and the CMake targets dist-git and distdfsg-git.
I have tried it right now and unfortunately it doesn't work any more at the moment. I guess it still needs to be ported to Py3.
so the github action pulls the FreeCAD repo with git, adds the git information to the Version.h.cmake, commits the changes and creates a tar.gz with git archive. Not sure if there are additional tasks that need to be part of this procedure.
wmayer wrote: ↑Sat Oct 30, 2021 8:44 am
Luckily with the move from svn to git we can use the fact that it will ignore all files that are no part of the repository and additionally with .gitattributes we can ignore certain files of the repository.
To create source tarballs this way I once wrote the script makedist.py and the CMake targets dist-git and distdfsg-git.
I have tried it right now and unfortunately it doesn't work any more at the moment. I guess it still needs to be ported to Py3.
Thanks for the information. I will have a look at it.