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 DB9D910FE1 for ; Wed, 14 Aug 2013 20:10:18 +0000 (UTC) Received: (qmail 44310 invoked by uid 500); 14 Aug 2013 20:10:17 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 42856 invoked by uid 500); 14 Aug 2013 20:10:14 -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 42833 invoked by uid 99); 14 Aug 2013 20:10:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Aug 2013 20:10:12 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of purplecabbage@gmail.com designates 209.85.212.45 as permitted sender) Received: from [209.85.212.45] (HELO mail-vb0-f45.google.com) (209.85.212.45) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Aug 2013 20:10:08 +0000 Received: by mail-vb0-f45.google.com with SMTP id e15so8062568vbg.32 for ; Wed, 14 Aug 2013 13:09:48 -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=V4uRQalmOeJ0Q4YM5NVm5I4XE6XbRTcKLZ2SdcVgpLU=; b=zla9Lw/qloLnNoKA1PDybU+SbaB2ht6GNPZI8sKn4gB2lzwPtQZrjSXtZzKxW5RL8q 0z82C5/0ZglfuCMrxWM4q+TdW0MSM9X9kFUkHxONkGj5EtLkv7tIRjJiNBLXXQeYAB+n D+Gk9Htiy20PXzZGEOnL0Y3E6rseiBUONsMcHr+hZeC5PpdYr/3bYiRi0FLfAJt5dl/E J+KiX/Irx3ghrapbdYdHNiNjLrng62eQqceFQ3a0xpHSnQvGmnRuve/xcZSrJhRR5fDj WGTNfCg8iW13sRE7Klup5Qo4iTvYIAKpdB5X0jaqvpH+zyMP7CE8ThQNq+T/5ITo2wS7 x9bA== MIME-Version: 1.0 X-Received: by 10.58.76.130 with SMTP id k2mr9874262vew.24.1376510987851; Wed, 14 Aug 2013 13:09:47 -0700 (PDT) Received: by 10.58.32.33 with HTTP; Wed, 14 Aug 2013 13:09:47 -0700 (PDT) In-Reply-To: References: Date: Wed, 14 Aug 2013 13:09:47 -0700 Message-ID: Subject: Re: Storing Version Numbers From: Jesse To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=047d7b3a86f675df9204e3edf0eb X-Virus-Checked: Checked by ClamAV on apache.org --047d7b3a86f675df9204e3edf0eb Content-Type: text/plain; charset=ISO-8859-1 windows8 + wp7 and wp8 all have the version script as well, but it simply echos the content of the ../VERSION file Currently the dev branch has a VERSION of 0.0.0 because I needed it to be a valid version number format for other things. I like the transparency of simply having a VERSION file at the root of any cordova project. Can't we just remove the extra steps with the git hash checking? @purplecabbage risingj.com On Wed, Aug 14, 2013 at 12:44 PM, Filip Maj wrote: > Looks good to me! > > On 8/14/13 11:49 AM, "Andrew Grieve" wrote: > > >Ian's put together a wiki page on how to store version numbers in our > >repos: > >https://wiki.apache.org/cordova/PlatformVersionScripts > > > >I'd like to add info to it for non-platform repos as well, but want to > >draw > >everyone's attention to it on the ML so that we can have easier comments > >about it: > > > > > >= All Repositories = > >'''Proposal''' > >VERSION files go away. None of the below schemes use them, so they should > >be added only when building Apache release .zips. > > > >= Cordova platforms = > > > >Cordova platforms should have a simple, reliable method to report their > >version number, for use by automated tools such as CLI and plugman. > > > >The current method for doing this (supported by Android; support coming > >for > >other platforms) is to have a script in the platform package, under > >`bin/templates/cordova/version`, which can be called to report the version > >number. > > > >Previously, this file would, on some platforms, go through some rather > >complicated process to infer the correct version number (such as checking > >the git hash of the included cordova.js file). It will be simpler and > >easier to maintain to have this file simply echo a string constant. > > > >The version number should correspond closely to the git branch. When a > >release branch is made, both the branch and the master branch should be > >updated. The master branch should *always* have a version number ending in > >"-dev", which indicates the version currently being developed. A fresh > >release branch should change the version to an "-rc1" version, and then > >change to the unqualified version number when it is released. > > > >(This constant version number can be updated manually, but *should* > >eventually be updated via coho as release branches are made.) > > > >This should give a rough idea how the version number should advance: > > > >{{{ > > 3.3.0-dev > > 3.2.0-dev| > > | | > >--A---B---C---D (master) > > \ > > \--E---F---G---H (3.2.x) > > | | | > > 3.2.0-rc1| 3.2.1-rc1 > > 3.2.0 > >}}} > > > > * A: This is on the master branch, after 3.1.x has been branched, as 3.2 > >is being developed. > > * B: This is the branch point for 3.2.x > > * C: The first commit after 3.2.x is branched should identify the master > >branch as 3.3 is being developed on master now. > > * E: The first commit on the 3.2.x branch should identify the branch as > >3.2.0-rc1 > > * G: At some point, 3.2.0 is released, and should be identified as such > > * H: After 3.2.0 is released, any further development can be called > >3.2.1-rc1 > > > >Current support: > > > >||'''Platform'''||'''Support'''|| > >||Android || {*} || > >||BB10 || {o} || > >||iOS || {o} || > >||OSX || {o} || > >||QT || {o} || > >||Tizen || {o} || > >||WebOS || {o} || > >||Win || {o} || > >||WP7 || {o} || > >||WP8 || {o} || > >||www || {o} || > > > >= Cordova JS = > > > >The version of the JS is stamped at the top of the built .js file by > >grunt. > > > >Currently, the version is derived using `git describe` and so is based off > >of the closest git tag in the history. This works well for releases, but > >isn't great for dev builds since there are no tags made on master. > > > >'''Proposal:''' > > 1. Follow platform versioning scheme and store it in a constant within > >Gruntfile.js. > > 1. When in built in the context of a git repo, and not at a tagged > >commit, > >append the git hash. > > 1. When not in a git repo or at a tagged commit, don't try and append a > >hash. > > > >= Core Plugins = > > > >Current state is that we have master & dev branches. This is because > >plugman pulls from master by default, so it must remain stable. > > > >Once plugman-registry is launched, it should be used instead > > > >'''Proposal:''' > > 1. Stick with dev / master branches > > 1. Releases involve: > > a. Update plugin.xml's version to "3.1.0" > > a. Merge dev -> master > > a. Update plugin.xml's version again to say "3.2.0-dev" > > > >= Plugman & CLI = > > > >These tools are built as npm modules, and so use package.json & semver > >versioning. > > --047d7b3a86f675df9204e3edf0eb--