Closed danielmarschall closed 7 months ago
I want that in the future OIDplus becomes independent of the ViaThinkSoft server, and only depends on GitHub. This also allows to easily fork and maintain it in case something would happen to me.
I looked further into the details, but there will be a lot of changes required to migrate from SVN to GIT!
Updates in re my list above.
UPDATE according to 2.0.1
1. In GitHub we probably need to make use of the "release / package" feature so we can define that a specific commit is a new version, because OIDplus requires some kind of version number, which was super easy with SVN, but hard with GIT, because there are no numbered commits.
SOLUTION: "changelog.json.php" - this file is checked automatically. The commit which first changes the top version in that file is the commit that introduced the version.
In the future, we can still make use of the release/package feature, because there we can host ZIP files. For now, the ZIP files are stored at ViaThinkSoft (they get auto-generated from SVN). Switching the ZIP file location only requires editing includes/edition.ini
2. Check all places in the program code that handles "SVN Revision" and look if (how) we can switch to Git.
Instead of counting in "SVN Revisions", we need to look at the version. The latest tag can be shown using git describe $(git rev-list --tags --max-count=1)
. Comparisons in PHP with version_compare()
. But we made it easier by just looking at the committed changelog.json.php.
3. For SVN distribution channel: Change the internal tool to let SVN be a copy of GIT instead of GIT being a copy of SVN.
Rejected. Internally I will continue to develop with SVN, but that's okay. Now, I can always switch to Git latest on, without any changes required in the program.
4. For GIT distribution channel: Nothing to do.
Yes.
5. For TAR.GZ distribution channel: Rebuild tool that creates the autogenerated change-scripts as well as the TAR.GZ file itself.
DONE. In the future, the ZIP or TAR.GZ can be added to the GitHub assets.
6. Change internal tool that creates the checksums ( https://oidplus.com/checksums/ ) for the system check plugin.
DONE. Checksum are now stored in the release, not on a server anymore.
7. We will probably recognize a lot of more places where SVN is important once we switched to GIT...
Currently no problems known.
Some helpful API endpoints:
https://api.github.com/repos/danielmarschall/oidplus/activity to see the latest commit hash code
https://api.github.com/repos/danielmarschall/oidplus/tags to see the latest tag. See usage example: https://api.github.com/repos/phpstan/phpstan/tags
Done! Now released version 2.0.1 !
Currently, the main development is in a SVN repository. All SVN changes are automatically uploaded to GitHub as a mirror and seconary distribution channel.
So we currently have 3 distribution channels:
Currently, each SVN revision is a OIDplus version. At a lot of places the "SVN Revision" is processed.
If we switch to Git as distribution channel we need to do:
So to conclude, it is extremely hard to switch from SVN to GIT... So this is a long-time project.