Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9DC1711B51 for ; Tue, 12 Aug 2014 17:42:56 +0000 (UTC) Received: (qmail 84683 invoked by uid 500); 12 Aug 2014 17:42:56 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 84644 invoked by uid 500); 12 Aug 2014 17:42:56 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 84627 invoked by uid 99); 12 Aug 2014 17:42:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Aug 2014 17:42:55 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of purplecabbage@gmail.com designates 209.85.220.173 as permitted sender) Received: from [209.85.220.173] (HELO mail-vc0-f173.google.com) (209.85.220.173) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Aug 2014 17:42:30 +0000 Received: by mail-vc0-f173.google.com with SMTP id hy10so13676675vcb.18 for ; Tue, 12 Aug 2014 10:42:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=PPUUk7ixknQ6gOwJMp82n3/DllUT8/OF62cNFn88oc0=; b=y281jJybxEScUixVQUh1aaHwqr62VjSn5/HFFr6jlbp1sYYangGftzqG/JZGyqzf2G ndSnl4GH6STNE4otFJv/njL4HHcmXIWiM7wNALqtghlEWBn1hXaNRI04gkbY31FRtm6I 1GhdS0u11tpSCUScTMHCB2SieVIXUgd5eqokybfT6spbkMwWDfWZOBKGxOmXV6uXwBfh y2eB4LnyhliywHSFBd+KqdXLuciCMGmw7EGbiw84/BjposjAnlbr5zFL0N4Pa2S2P87V dgnwWbPT8ZVDxS9DzEV8DHTmsSm6DcnNLwc2qj6jBjlj0vvGBXSfD8Bdb2hSXS3jWLIL Nn7A== MIME-Version: 1.0 X-Received: by 10.220.2.136 with SMTP id 8mr5470315vcj.17.1407865349246; Tue, 12 Aug 2014 10:42:29 -0700 (PDT) Received: by 10.220.173.135 with HTTP; Tue, 12 Aug 2014 10:42:29 -0700 (PDT) In-Reply-To: References: Date: Tue, 12 Aug 2014 10:42:29 -0700 Message-ID: Subject: Re: cordova.js and cordova.platformVersion From: Jesse To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=001a11c3bee208960e0500723250 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c3bee208960e0500723250 Content-Type: text/plain; charset=UTF-8 so did I, good otherwise. @purplecabbage risingj.com On Tue, Aug 12, 2014 at 7:58 AM, Andrew Grieve wrote: > add some nitpick-type comments on your commit, but looks good! > > > On Mon, Aug 11, 2014 at 8:45 PM, Steven Gill > wrote: > > > So I have removed cordova.version and added cordova.platformVersion on > the > > branch cb-7219 on my repo. Check it out at > > https://github.com/stevengill/cordova-js/tree/cb-7219. It adds the > output > > from "git rev-list HEAD --max-count=1" at the top as a comment in > > cordova.js and creates a constant named "PLATFORM_VERSION_BUILD_LABEL" > > which we use to set cordova.platformVersion. > > > > To create cordova.js, run: > > grunt --platformVersion=3.6.0 > > or > > grunt compile --platformVersion=3.6.0 > > or > > grunt compile:android --platformVersion=3.6.0 > > or > > grunt compile-browserify --platformVersion=3.6.0 > > > > > > I still have a bit of work to do in > > cordova-lib/src/plugman/prepare-browserify.js > > A) get it to compute commit ids > > B) Create utility function to grab platformVersion from > > "platform_www/cordova.js" > > > > If you all like it, I can merge it into master. Coho will need some > updates > > to support this too. > > > > > > On Fri, Aug 8, 2014 at 5:40 PM, Steven Gill > > wrote: > > > > > Thanks for the comments! > > > > > > Currently, if you build cordova.js and the version is 3.5.0-dev, it > will > > > make the build label 3.5.0-dev + output from (git rev-list HEAD > > > --max-count=1 --abbrev-commit). > > > > > > If the version in 3.5.0(no dev), the build label is just 3.5.0 (no > commit > > > sha hash). > > > > > > I can make it so the build-label adds the commit sha as a comment at > the > > > top always. > > > > > > I will also look to add the entire command line args to create it in > the > > > comments at the top. > > > > > > > > > > > > > > > > > > > > > On Fri, Aug 8, 2014 at 4:38 PM, Jesse wrote: > > > > > >> Yes, the output cordova.js file should contain the sha hash and > probably > > >> also, the entire command-line args used to create it. So we can track > > >> back > > >> issues. > > >> > > >> @purplecabbage > > >> risingj.com > > >> > > >> > > >> On Fri, Aug 8, 2014 at 4:27 PM, Shazron wrote: > > >> > > >> > Sounds good for #1. For traceability purposes, will the sha hash be > in > > >> > the .js still as a comment, etc? > > >> > ```git describe``` > > >> > > > >> > On Thu, Aug 7, 2014 at 7:07 AM, Andrew Grieve > > > >> > wrote: > > >> > > That all sounds good to me Steve! > > >> > > > > >> > > > > >> > > On Wed, Aug 6, 2014 at 6:48 PM, Steven Gill < > stevengill97@gmail.com > > > > > >> > wrote: > > >> > > > > >> > >> I have started to look into adding cordova.platformVersion to > > >> > cordova.js. > > >> > >> Issue [1]. > > >> > >> > > >> > >> Trying to figure out the best way to implement this. > > >> > >> > > >> > >> One potential method. > > >> > >> > > >> > >> 1) Pass in platformVersion to cordova.js during build step. Make > > coho > > >> > >> handle it during release process: > > >> > >> First off, cordovajs doesn't get branched and tagged on its own > > >> anymore > > >> > >> > > >> > >> Non-Browserify use case > > >> > >> A) coho prepare-release-branch --version 3.5.0 -r android > > >> > >> - This step would build cordova-js, inject > > cordova.platformVersion > > >> > based > > >> > >> on the --version being passed in. > > >> > >> - Updating version in package.json files > > >> > >> - Updating version numbers > > >> > >> - Creating release branches > > >> > >> > > >> > >> B) coho tag-release --version 3.5.0 -r android > > >> > >> - Tag cordova-android "3.5.0" > > >> > >> - Tag cordova-js "android-3.5.0" > > >> > >> > > >> > >> Browserify use case > > >> > >> Currently, cordova.version is set to 'N/A' in browserify builds > of > > >> > >> cordova.js. > > >> > >> > > >> > >> We would probably have to create a utility function that grabs > the > > >> > >> cordova.platformVersion property from "platform_www/cordova.js" > > >> files. > > >> > >> These are the cordova.js files that get bundled at release with > the > > >> > >> platforms from the non-browserify use case. > > >> > >> > > >> > >> Use the version when building cordova.js in > prepare-browserify.js. > > >> > >> > > >> > >> > > >> > >> Thoughts? Other suggestions? > > >> > >> > > >> > >> > > >> > >> [1] https://issues.apache.org/jira/browse/CB-7219 > > >> > >> > > >> > > > >> > > > > > > > > > --001a11c3bee208960e0500723250--