This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Automatically adding version number to the code

Is there any method/technique/feature to add automatically incremented build number to the code (managed by software or tool)?
the build number can be used for viewing (hence traceability of the code).

Parents
  • I created a text file (template.txt) and updated

    // Test file for SubWCRev
    
    char *Revision      = "$WCREV$";
    char *Revision16    = "$WCREV&0xFF$";
    char *Revisionp100  = "$WCREV+100$";
    char *Revisionm100  = "$WCREV-100$";
    char *Modified      = "$WCMODS?Modified:Not modified$";
    char *Unversioned   = "$WCUNVER?Unversioned items found:no unversioned items$";
    char *Date          = "$WCDATE$";
    ...                            // as given on the site
    
    #if $WCMODS?1:0$
    #error Source is modified
    #endif
    


    then saved it as .tmpl file.

    SubWCRev D:\MyLPC1788\Codes\Development Board\Local D:\MyLPC1788\Codes\Development Board\template.tmpl D:\MyLPC1788\Codes\Development Board\version.h -nmdfe

    But the nothing change in the version.h file. So i changed the name to version.txt but no updates.
    What is the mistake that i am committing?

Reply
  • I created a text file (template.txt) and updated

    // Test file for SubWCRev
    
    char *Revision      = "$WCREV$";
    char *Revision16    = "$WCREV&0xFF$";
    char *Revisionp100  = "$WCREV+100$";
    char *Revisionm100  = "$WCREV-100$";
    char *Modified      = "$WCMODS?Modified:Not modified$";
    char *Unversioned   = "$WCUNVER?Unversioned items found:no unversioned items$";
    char *Date          = "$WCDATE$";
    ...                            // as given on the site
    
    #if $WCMODS?1:0$
    #error Source is modified
    #endif
    


    then saved it as .tmpl file.

    SubWCRev D:\MyLPC1788\Codes\Development Board\Local D:\MyLPC1788\Codes\Development Board\template.tmpl D:\MyLPC1788\Codes\Development Board\version.h -nmdfe

    But the nothing change in the version.h file. So i changed the name to version.txt but no updates.
    What is the mistake that i am committing?

Children