Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-2522

sigil build requires buildQualifer to be set as a -D flag to ant in order to properly override default .SNAPSHOT qualifier

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Sigil
    • None

    Description

      In order to build a "valid"/useful set of bundles for install into eclipse the bundle filename must be of the form <bsn>_maj.min.min.qualifier and this must match the Bundle_SymbolicName and Bundle_Version attributes in the bundle manifest.

      The sigil build defaults to setting the qualifier to .SNAPSHOT in the bldcommon/build.properties file

      However if a .SNAPSHOT version is installed in eclipse then it can never be updated as eclipse sees other snapshots as being equivalent. Therefore the release script I run to build a release has the following:

      $ more release.sh
      now=$(date +%Y%m%d_%H%M%S)
      ant -DbuildQualifier=$now clean dist $*

      It would be better to use the <tstamp /> option of ant but this doesn't seem to work properly

      I've added:

      $ svn diff bldcommon/build.properties build.xml
      Index: bldcommon/build.properties
      ===================================================================
      — bldcommon/build.properties (revision 982153)
      +++ bldcommon/build.properties (working copy)
      @@ -2,7 +2,7 @@

      1. easier to set here than in xml file

      buildRelease = 0.9.0
      -buildQualifier = SNAPSHOT
      +#buildQualifier = SNAPSHOT
      buildVersion = ${buildRelease}.${buildQualifier}

      1. set common.dir when used without ant (e.g. IvyDE)
        Index: build.xml
        ===================================================================
          • build.xml (revision 982153)
            +++ build.xml (working copy)
            @@ -21,6 +21,9 @@
            xmlns:ivy="antlib:org.apache.ivy.ant"
            xmlns:groovy="antlib:org.codehaus.groovy">

      + <tstamp>
      + <format property="buildQualifier" pattern="yyyyMMdd_HHmmss" />
      + </tstamp>
      <import file="bldcommon/common.xml"/>

      <fileset id="my.projects" dir="${basedir}">
      @@ -31,6 +34,9 @@
      </fileset>

      <target name="init">
      +
      + <echo>DEBUG ${buildQualifier}</echo>
      +
      <subant buildpath="bldcommon/prepare" target="resolve" />
      </target>

      This results in the file name being created with the correct version but the Bundle-Version - set from sigil-defaults.properties is still set to .SNAPSHOT

      Attachments

        Activity

          People

            Unassigned Unassigned
            davemssavage David Savage
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: