wpkg --increment-build-number
Options | Comments |
---|---|
--verbose | Display the build number after it was incremented. |
The --increment-build-number command is used to add one to the build number.
The packager library has built in functions to create, load, and increment build numbers in an automated way. Assuming you decided to make full use of wpkg to package your project source code and build its binary package from that source package, then all you have to do is create a build number file as in:
cd <your-project-root-directory> mkdir wpkg touch wpkg/build_number
These few Unix instruction create a directory named wpkg and place a file named build_number into it. That file is empty by default meaning that no build occured yet. The --build command by itself, used in your project root directory to generate the source package will automatically increment the file by one:
cd <your-project-root-directory> wpkg --build
The current build number can be displayed using the --print-build-number command.
If you do not want to use the default filename, you may specify a filename after the --increment-build-number command. It is possible to define another name with the --build-number-filename option. Note, however, that you cannot use both methods to define the filename.