Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16365] CLI: Command and Hook minimum CLI version does not work when CLI version contains a label like 3.2.1-beta

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-02-07T21:32:35.000+0000
Affected Version/sRelease 3.2.0
Fix Version/s2014 Sprint 03, 2014 Sprint 03 Core, Release 3.2.1, Release 3.3.0
ComponentsCLI
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2014-02-03T23:48:21.000+0000
Updated2014-06-19T12:43:08.000+0000

Description

If you have a hook that requires a min CLI version like this:
exports.cliVersion = ">=3.2.1";
Then it only works when the Titanium CLI version is in the format "X.Y.Z.label" and not "X.Y.Z-label".

Comments

  1. Chris Barber 2014-02-04

    Titanium CLI master pull request: https://github.com/appcelerator/titanium/pull/110 Titanium CLI 3.2.x pull request: https://github.com/appcelerator/titanium/pull/112 node-appc master pull request: https://github.com/appcelerator/node-appc/pull/83 node-appc 3.2.x pull request: https://github.com/appcelerator/node-appc/pull/84
  2. Chris Barber 2014-02-04

    To test the CLI changes: 1. create a directory called "foo" 2. in that directory, create a file called "bar.js" with the following:
       exports.cliVersion = '>=5.0.0'; // something big
       
    3. add the directory to the paths.hooks:
       ti config paths.hooks -a /path/to/hook
       
    4. update your cli version to have a "-beta" tag by either installing a beta release or editing /usr/local/lib/node_modules/titanium/package.json and setting the version to "X.Y.Z-beta" 5. build any app and notice the warning at the top of the output saying the plugin was incompatible
  3. Chris Barber 2014-02-07

    To test the node-appc PR: 1. clone the node-appc git repo 2. cd node-appc 3. npm install 4. ./forge test version 5. Some tests should fail 6. git checkout -b timob-16365 origin/timob-16365 7. ./forge test version 8. All "version" tests should pass.
  4. Samuel Dowse 2014-02-10

    Verified fixed on: Mac OSX 10.9.1 Windows 8.1 Appcelerator Studio, build: 3.2.1.201402061120 Titanium SDK, build: 3.2.1.v20140206170116 CLI: 3.2.1-beta5 Alloy: 1.3.1-cr2 Xcode: 5.0.2 Create, Build, Clean and Project work as expected across Android, BlackBerry, iOS, MobileWeb and Tizen. Closing.

JSON Source