Share My Creation ABVersionController

This is private B4J library written in Java which we use within our company to keep versions of our B4J code. Some of you may be familiar with tools like GitHub etc... to keep track of changes you made in your source code. This is a similar tool which keeps track of changes in the B4J source code and the layout files. It is for one developer, not for teams.

With adding some simple code to each project, every time we run (well not every time, only per version number + day of the year) a backup is taken.:

B4X:
' in Globals
Private VERSIONNUMBER As String = "1.1.2"

 ' in AppStart
 Dim VC As ABVersionController
' list of IP Address that are allow to do a push
 VC.Initialize("K:\_ONETWO_VC", Array("192.168.19.143","192.168.86.150","172.23.176.1","192.168.112.1","192.168.19.123"))
' list of folders that should be excluded when making the backup
 VC.PushVersion(VERSIONNUMBER, Array("_backups", "autobackups","b4xlibs","bin","logs", "b4xlibs_BANano"))

Methods in the library:

Initialize:


GetMyIP:

A helper method to find out what your current (Development) IP Address is


PushVersion:


MarkChanges:


GetVersions:


Our workflow:

1. Before we start working on a project, we do a 'first' push of the day' by just running the app and older versions (not currently DEPLOYED) are zipped.
2. Then we start making changes
3. With every run, some reports are made:
  • one between our current development and this 'first push', this shows all the changes we made during the day
  • one between another push which we marked as 'DEPLOYED', this shows all the changes we made since our last deployment.
Such a report looks like this. It marks which files are new, changed or deleted and within each changed file it marks what code has been deleted, changed or added:



Such a report can also be made manually between versions.

4. At the end of the day, our backup software backups the whole folder K:\ONETWO_VC to our NAS. This is an example of how the folder structure looks like with one of our apps.



It is an alternative way of doing Version Control without having to use external tools like GitHub. It may not be suitable for everyone's situation, but in our small team, it works very well.

Alwaysbusy
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…