How to increment the version number of a package (.spk file) built using the buildSPK() function in TERR.

How to increment the version number of a package (.spk file) built using the buildSPK() function in TERR.

book

Article ID: KB0071138

calendar_today

Updated On:

Products Versions
Spotfire Enterprise Runtime for R All Versions

Description

TIBCO Enterprise Runtime for R Packages (SpotfireSPK.spk) are expected to be always created with version 1.0.0.0 if the user is creating a new package description file (DCF) for each revision of the package. The package description file, SpotfireSPK.dcf, should only be written from scratch using writeLines() during the initial creation of the package (i.e., version 1.0.0.0). If a user needs to add or remove R packages from the package, manually modify the DCF file using any text editor. Once this is done, the buildSPK() function will then increment the package version appropriately: minor version increment for R package additions or updates, major version increment for R package removals or downgrades. This information will be written back to the DCF file for future use.

Resolution

For versions 4.0.2 and lower:
Follow the steps below to add R packages and subsequently expect an increment in the SPK package version.
 
1). After you have installed the R packages that you want to add, find the SpotfireSPK.dcf in the file system.
2). Launch your text editor and edit the DCF file.
3). Change the first line to add or remove R packages to the Packages list.
 
Example:
    Change the following line:
        Packages: rpart
    TO:
        Packages: rpart, adagio
 
4). Save the file.
5). Go back to TERR for R console, build the SPK file using the buildSPK function. The package should be built with the version number incremented.  
 
Example:
Packages: rpart, adagio
Built: TERR 2.7.0; 2014-10-10 14:06:00 EDT
BuiltName: TIBCO Enterprise Runtime for R Packages
BuiltId: F13B9A7E-783A-432a-8676-42FCD3022D70
BuiltVersion: 1.1.0.0
BuiltPackages: adagio (>=0.5.9),rpart (>=4.1-8)

For versions 4.1.0 and Higher:

If you create a DCF and want to assign a specific version number to it, run the buildSPK function and pass in the DCF argument, along with the argument version, setting it to the version you want. This argument is a character string or a numeric_version object containing four components (for example, version = "1.2.3.4").

Issue/Introduction

How to increment the version number of a package (.spk file) built using the buildSPK() function in TERR.

Additional Information

Doc: TIBCO Spotfire® Package Management Doc: Spotfire SPK versioning