You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/07/13 05:31:28 UTC

[GitHub] [incubator-nuttx] baggio63446333 opened a new pull request #4144: tools/version.sh: Fix version number to get on master branch

baggio63446333 opened a new pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144


   ## Summary
   When we get the nuttx version from git on the master branch, we get
   '10.1.0-RC1' by 'git tag --sort=v:refname'. It would be better to get
   '10.1.0' with '--sort=taggerdate' option.
   
   ## Impact
   None
   
   ## Testing
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton removed a comment on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
btashton removed a comment on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-879092612


   > I have some sort of a recollection that `taggerdate` caused problems, but I can't remember neither can I produce any issue with the given command. So, LGTM.
   
   Correct please do not merge this! 
   
   If we create a bug fix for say 10.0.2 you will now start seeing that as the latest version.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] Ouss4 commented on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-879100583


   > @davids5
   > Yes, it Is another problem.
   > Would your problem be solved if I pushed the following change?
   > 
   > ```diff
   > diff --git a/tools/version.sh b/tools/version.sh
   > index 5e54eae3b7..51bb4ad220 100755
   > --- a/tools/version.sh
   > +++ b/tools/version.sh
   > @@ -75,7 +75,7 @@ if [ -z ${VERSION} ] ; then
   >  
   >    # If the VERSION does not match X.Y.Z, retrieve version from the tag
   >  
   > -  if [[ ! ${VERSION} =~ ([0-9]+)\.([0-9]+)\.([0-9]+) ]] ; then
   > +  if [[ ! ${VERSION} =~ nuttx-([0-9]+)\.([0-9]+)\.([0-9]+) ]] ; then
   >      VERSION=`git -C ${WD} tag --sort=taggerdate | grep -E "nuttx-[0-9]+\.[0-9]+\.[0-9]+" | tail -1 | cut -d'-' -f2-`
   >    fi
   > ```
   
   That `if` part will always be false, `VERSION` doesn't contain `nuttx-`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton edited a comment on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
btashton edited a comment on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-879113045


   > > If we create a bug fix for say 10.0.2 you will now start seeing that as the latest version.
   > 
   > Yes, I am aware of this problem.
   > I hope that , as the rules for tagging by maintainers, after creating `nuttx-10.0.2` tag on 'release/10.0' branch, they update a tag of the latest version.
   > $ git tag nuttx-10.1.0 -f -a
   > 
   > Is this operation difficult or complex?
   
   Why would you update an unrelated tag and force push it, that seems very incorrect.
   https://git-scm.com/docs/git-tag#_on_re_tagging


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] baggio63446333 commented on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
baggio63446333 commented on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-879083818


   @davids5 
   Yes, it Is another problem.
   Would your problem be solved if I pushed the following change?
   ```diff
   diff --git a/tools/version.sh b/tools/version.sh
   index 5e54eae3b7..51bb4ad220 100755
   --- a/tools/version.sh
   +++ b/tools/version.sh
   @@ -75,7 +75,7 @@ if [ -z ${VERSION} ] ; then
    
      # If the VERSION does not match X.Y.Z, retrieve version from the tag
    
   -  if [[ ! ${VERSION} =~ ([0-9]+)\.([0-9]+)\.([0-9]+) ]] ; then
   +  if [[ ! ${VERSION} =~ nuttx-([0-9]+)\.([0-9]+)\.([0-9]+) ]] ; then
        VERSION=`git -C ${WD} tag --sort=taggerdate | grep -E "nuttx-[0-9]+\.[0-9]+\.[0-9]+" | tail -1 | cut -d'-' -f2-`
      fi
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] baggio63446333 commented on a change in pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
baggio63446333 commented on a change in pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#discussion_r668918404



##########
File path: tools/version.sh
##########
@@ -71,12 +71,12 @@ done
 OUTFILE=$1
 
 if [ -z ${VERSION} ] ; then
-  VERSION=`git -C ${WD} describe 2>/dev/null | tail -1 | cut -d'-' -f2`
+  VERSION=`git -C ${WD} describe --match "nuttx-*" 2>/dev/null | tail -1 | cut -d'-' -f2`

Review comment:
       Adding `--match` option of `git describe` is nice-to-have to prevent the wrong version from being retrieved depending on the environment. If it's better without it or is side-effect, I'll delete it.
   
   > @masayuki2009 changed the regex to accommodate something similar, but maybe this doesn't cover your use case.
   
   This is about `git tag ... | grep -E "nuttx-` and this regex is helpful for me to manage tags on fork repository.
   
   Thanks.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] davids5 commented on a change in pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
davids5 commented on a change in pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#discussion_r668879929



##########
File path: tools/version.sh
##########
@@ -71,12 +71,12 @@ done
 OUTFILE=$1
 
 if [ -z ${VERSION} ] ; then
-  VERSION=`git -C ${WD} describe 2>/dev/null | tail -1 | cut -d'-' -f2`
+  VERSION=`git -C ${WD} describe --match "nuttx-*" 2>/dev/null | tail -1 | cut -d'-' -f2`

Review comment:
       Ok I think I got it. It is tagged
   
   `git fetch nuttx -f --tags`
   
   Then run it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] davids5 edited a comment on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
davids5 edited a comment on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-879185461


   ![image](https://user-images.githubusercontent.com/1945821/125478631-fa1ccdbc-b73b-4b85-a84d-f97663dd94e8.png)
   Result in
   
   ![image](https://user-images.githubusercontent.com/1945821/125478784-d1fb71d1-dd54-4571-90f1-0ba2db56b942.png)
   
   So this makes me wonder if the annotated tag on the master branch at the release point?
   
   With this change 
   ![image](https://user-images.githubusercontent.com/1945821/125479408-3c5af22d-609a-4d5f-91be-8af59dbcd005.png)
   
   ![image](https://user-images.githubusercontent.com/1945821/125479256-e5c44d0e-961e-40ee-bd7e-461d66dd2ff5.png)
   
   
   See Above.... https://github.com/apache/incubator-nuttx/pull/4144#discussion_r668879929


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] gustavonihei commented on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-879127078


   The following patch fix the way git sorts the tag name:
   ```patch
   diff --git a/tools/version.sh b/tools/version.sh
   index f0e5efbaaa..beac1d1ab2 100755
   --- a/tools/version.sh
   +++ b/tools/version.sh
   @@ -76,7 +76,7 @@ if [ -z ${VERSION} ] ; then
      # If the VERSION does not match X.Y.Z, retrieve version from the tag
    
      if [[ ! ${VERSION} =~ ([0-9]+)\.([0-9]+)\.([0-9]+) ]] ; then
   -    VERSION=`git -C ${WD} tag --sort=v:refname | grep -E "nuttx-[0-9]+\.[0-9]+\.[0-9]+" | tail -1 | cut -d'-' -f2-`
   +    VERSION=`git -C ${WD} -c 'versionsort.suffix=-' tag --sort=v:refname | grep -E "nuttx-[0-9]+\.[0-9]+\.[0-9]+" | tail -1 | cut -d'-' -f2-`
      fi
    
    fi
   ```
   Reference: https://stackoverflow.com/a/52680984


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] acassis merged pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
acassis merged pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] gustavonihei edited a comment on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
gustavonihei edited a comment on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-879127078


   The following patch fixes the way git sorts the tag name:
   ```patch
   diff --git a/tools/version.sh b/tools/version.sh
   index f0e5efbaaa..beac1d1ab2 100755
   --- a/tools/version.sh
   +++ b/tools/version.sh
   @@ -76,7 +76,7 @@ if [ -z ${VERSION} ] ; then
      # If the VERSION does not match X.Y.Z, retrieve version from the tag
    
      if [[ ! ${VERSION} =~ ([0-9]+)\.([0-9]+)\.([0-9]+) ]] ; then
   -    VERSION=`git -C ${WD} tag --sort=v:refname | grep -E "nuttx-[0-9]+\.[0-9]+\.[0-9]+" | tail -1 | cut -d'-' -f2-`
   +    VERSION=`git -C ${WD} -c 'versionsort.suffix=-' tag --sort=v:refname | grep -E "nuttx-[0-9]+\.[0-9]+\.[0-9]+" | tail -1 | cut -d'-' -f2-`
      fi
    
    fi
   ```
   Reference: https://stackoverflow.com/a/52680984


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] acassis merged pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
acassis merged pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton commented on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-882546450


   > @btashton 
   > On the advice of @gustavonihei , I have changed this PR to add `-c 'versionsort.suffix=-'`. Will this PR be accepted? If not, I will close it.
   
   Probably should have been `-RC` to filter off the full suffix but that is not too important here. Thanks for making this change!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] Ouss4 commented on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-878975190


   I have some sort of a recollection that `taggerdate` caused problems, but I can't remember neither can I produce any issue with the given command. So, LGTM.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] Ouss4 commented on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-879102858


   > > I have some sort of a recollection that `taggerdate` caused problems, but I can't remember neither can I produce any issue with the given command. So, LGTM.
   > 
   > Correct please do not merge this!
   > 
   > If we create a bug fix for say 10.0.2 you will now start seeing that as the latest version.
   
   Yeah, I think we saw this with the 9.1.1 patch.  I couldn't reproduce it locally because I didn't create any new tags. So in this case if we do `taggerdate` on master, it could report an old version with a newer tag.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton commented on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-882546450


   > @btashton 
   > On the advice of @gustavonihei , I have changed this PR to add `-c 'versionsort.suffix=-'`. Will this PR be accepted? If not, I will close it.
   
   Probably should have been `-RC` to filter off the full suffix but that is not too important here. Thanks for making this change!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] gustavonihei edited a comment on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
gustavonihei edited a comment on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-879127078






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on a change in pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#discussion_r668889242



##########
File path: tools/version.sh
##########
@@ -71,12 +71,12 @@ done
 OUTFILE=$1
 
 if [ -z ${VERSION} ] ; then
-  VERSION=`git -C ${WD} describe 2>/dev/null | tail -1 | cut -d'-' -f2`
+  VERSION=`git -C ${WD} describe --match "nuttx-*" 2>/dev/null | tail -1 | cut -d'-' -f2`

Review comment:
       > This command currently returns 8.2 on my environment. 
   
   That's because it's run from master.  8.2 is the last tag that's reachable from master. From 9.0 we started using release branches and tagging there instead from master.
   
   > The reason I added --match is just in case so that we can tag like v1.2.3 without "nuttx-" locally.
   
   @masayuki2009 changed the regex to accommodate something similar, but maybe this doesn't cover your use case.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] baggio63446333 edited a comment on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
baggio63446333 edited a comment on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-879108698


   > If we create a bug fix for say 10.0.2 you will now start seeing that as the latest version.
   
   Yes, I am aware of this problem.
   I hope that , as the rules for tagging by maintainers, after creating `nuttx-10.0.2` tag on 'release/10.0' branch,  they update a  tag of the latest version.
   $ git tag nuttx-10.1.0 <same commit-ish> -f -a 
   
   Is this operation difficult or complex?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] acassis merged pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
acassis merged pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] baggio63446333 commented on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
baggio63446333 commented on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-882460932


   @btashton 
   On the advice of @gustavonihei , I have changed this PR to add `-c 'versionsort.suffix=-'`. Will this PR be accepted? If not, I will close it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] baggio63446333 commented on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
baggio63446333 commented on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-879108698


   > If we create a bug fix for say 10.0.2 you will now start seeing that as the latest version.
   
   Yes, I am aware of this problem.
   I hope that , as the rules for tagging by maintainers, after creating `nuttx-10.0.2` tag on 'release/10.0' branch,  they update a  tag of the latest version.
   $ git tag 10.1.0 <same commit-ish> -f -a 
   
   Is this operation difficult or complex?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] gustavonihei edited a comment on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
gustavonihei edited a comment on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-879127078


   The following patch fixes the way git sorts the tag name:
   ```patch
   diff --git a/tools/version.sh b/tools/version.sh
   index f0e5efbaaa..beac1d1ab2 100755
   --- a/tools/version.sh
   +++ b/tools/version.sh
   @@ -76,7 +76,7 @@ if [ -z ${VERSION} ] ; then
      # If the VERSION does not match X.Y.Z, retrieve version from the tag
    
      if [[ ! ${VERSION} =~ ([0-9]+)\.([0-9]+)\.([0-9]+) ]] ; then
   -    VERSION=`git -C ${WD} tag --sort=v:refname | grep -E "nuttx-[0-9]+\.[0-9]+\.[0-9]+" | tail -1 | cut -d'-' -f2-`
   +    VERSION=`git -C ${WD} -c 'versionsort.suffix=-' tag --sort=v:refname | grep -E "nuttx-[0-9]+\.[0-9]+\.[0-9]+" | tail -1 | cut -d'-' -f2-`
      fi
    
    fi
   ```
   `suffix=-` will prevent `nuttx-10.1.0-RC1` being considered more recent than `nuttx-10.1.0`.
   
   Reference: https://stackoverflow.com/a/52680984


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#discussion_r668854959



##########
File path: tools/version.sh
##########
@@ -71,12 +71,12 @@ done
 OUTFILE=$1
 
 if [ -z ${VERSION} ] ; then
-  VERSION=`git -C ${WD} describe 2>/dev/null | tail -1 | cut -d'-' -f2`
+  VERSION=`git -C ${WD} describe --match "nuttx-*" 2>/dev/null | tail -1 | cut -d'-' -f2`

Review comment:
       This command currently returns **8.2** on my environment.
   What's the real purpose for it?
   Is it still useful or could we remove it in favor of retrieving the version from the `tag` command?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton commented on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-882546450


   > @btashton 
   > On the advice of @gustavonihei , I have changed this PR to add `-c 'versionsort.suffix=-'`. Will this PR be accepted? If not, I will close it.
   
   Probably should have been `-RC` to filter off the full suffix but that is not too important here. Thanks for making this change!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] baggio63446333 commented on a change in pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
baggio63446333 commented on a change in pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#discussion_r668868562



##########
File path: tools/version.sh
##########
@@ -71,12 +71,12 @@ done
 OUTFILE=$1
 
 if [ -z ${VERSION} ] ; then
-  VERSION=`git -C ${WD} describe 2>/dev/null | tail -1 | cut -d'-' -f2`
+  VERSION=`git -C ${WD} describe --match "nuttx-*" 2>/dev/null | tail -1 | cut -d'-' -f2`

Review comment:
       It is probably necessary to get the right version on the release branches like as `releases/9.1`. 
   The reason I added `--match` is just in case so that we can tag like `v1.2.3` without "nuttx-" locally.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton commented on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-879113045


   > > If we create a bug fix for say 10.0.2 you will now start seeing that as the latest version.
   > 
   > Yes, I am aware of this problem.
   > I hope that , as the rules for tagging by maintainers, after creating `nuttx-10.0.2` tag on 'release/10.0' branch, they update a tag of the latest version.
   > $ git tag nuttx-10.1.0 -f -a
   > 
   > Is this operation difficult or complex?
   
   Why would you update an unrelated tag and force push it, that seems very incorrect.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] baggio63446333 commented on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
baggio63446333 commented on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-882460932


   @btashton 
   On the advice of @gustavonihei , I have changed this PR to add `-c 'versionsort.suffix=-'`. Will this PR be accepted? If not, I will close it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] KazuyaHioki commented on a change in pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
KazuyaHioki commented on a change in pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#discussion_r669170145



##########
File path: tools/version.sh
##########
@@ -71,12 +71,12 @@ done
 OUTFILE=$1
 
 if [ -z ${VERSION} ] ; then
-  VERSION=`git -C ${WD} describe 2>/dev/null | tail -1 | cut -d'-' -f2`
+  VERSION=`git -C ${WD} describe --match "nuttx-*" 2>/dev/null | tail -1 | cut -d'-' -f2`

Review comment:
       Yes. My understanding is that the 1st check of `git describe` is mainly for release branches and 2nd check of `git tag` is for the master or other branches.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] davids5 commented on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
davids5 commented on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-879185461


   
   ![image](https://user-images.githubusercontent.com/1945821/125478631-fa1ccdbc-b73b-4b85-a84d-f97663dd94e8.png)
   Result in
   
   ![image](https://user-images.githubusercontent.com/1945821/125478784-d1fb71d1-dd54-4571-90f1-0ba2db56b942.png)
   
   So this makes me wonder if the annotated tag on the master branch at the release point?
   
   With this change 
   ![image](https://user-images.githubusercontent.com/1945821/125479408-3c5af22d-609a-4d5f-91be-8af59dbcd005.png)
   
   ![image](https://user-images.githubusercontent.com/1945821/125479256-e5c44d0e-961e-40ee-bd7e-461d66dd2ff5.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on a change in pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#discussion_r668889242



##########
File path: tools/version.sh
##########
@@ -71,12 +71,12 @@ done
 OUTFILE=$1
 
 if [ -z ${VERSION} ] ; then
-  VERSION=`git -C ${WD} describe 2>/dev/null | tail -1 | cut -d'-' -f2`
+  VERSION=`git -C ${WD} describe --match "nuttx-*" 2>/dev/null | tail -1 | cut -d'-' -f2`

Review comment:
       > This command currently returns 8.2 on my environment. 
   
   That's because it's run from master.  8.2 is the last tag that's reachable from master. From 9.0 we started using release branches and tagging there instead from master.
   
   > The reason I added --match is just in case so that we can tag like v1.2.3 without "nuttx-" locally.
   
   @masayuki2009 changed the regex to accommodate something similar, but maybe this doesn't cover your use case.
   Are you re-tagging release branches?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton commented on pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#issuecomment-879092612


   > I have some sort of a recollection that `taggerdate` caused problems, but I can't remember neither can I produce any issue with the given command. So, LGTM.
   
   Correct please do not merge this! 
   
   If we create a bug fix for say 10.0.2 you will now start seeing that as the latest version.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4144: tools/version.sh: Fix version number to get on master branch

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #4144:
URL: https://github.com/apache/incubator-nuttx/pull/4144#discussion_r668981405



##########
File path: tools/version.sh
##########
@@ -71,12 +71,12 @@ done
 OUTFILE=$1
 
 if [ -z ${VERSION} ] ; then
-  VERSION=`git -C ${WD} describe 2>/dev/null | tail -1 | cut -d'-' -f2`
+  VERSION=`git -C ${WD} describe --match "nuttx-*" 2>/dev/null | tail -1 | cut -d'-' -f2`

Review comment:
       > It is probably necessary to get the right version on the release branches like as `releases/9.1`.
   
   If that is the reason, then using `tag` should be enough, since it makes no distinction of the current checked-out branch.
   Right?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org