Need to get versioning of the branch name dynamically


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Old 3 Weeks Ago
Need to get versioning of the branch name dynamically

Hi,

I need to get versioning of the branch name dynamically. can you please help us to achieve this functionality.

Code:
curl https://altrecmktg.com/artifactory/mediamarketing/release-2.0.1/[/B]altrec.tar
curl https://altrecmktg.com/artifactory/mediamarketing/release-2.0.2[/B]/altrec.tar

everytime version will change as 2.0.1,2.0.2,2.03,..and so on..

Appreciate your help on this.
# 3  
Old 3 Weeks Ago
Bit sparse a specification, no?

Code:
$ VAR="curl https://altrecmktg.com/artifactory/mediamarketing/release-2.0.1/altrec.tar"
$ TMP=${VAR#*release-}
$ echo ${TMP%/*}
2.0.1

# 4  
Old 3 Weeks Ago
need help

Hi,

For each deployment external team was creating the version numbers .so i have to pick the latest version and pass the version in curl command to download .tar file.

e.g:
Code:
Name   Last modified      Size
../
1.0.0/  08-Nov-2018 11:11    -
1.0.1/  08-Nov-2018 14:36    -
1.0.2/  27-Nov-2018 13:55    -
1.0.3/  06-Dec-2018 11:47    -
1.0.4/  19-Dec-2018 10:46    -
1.0.5/  10-Jan-2019 21:26    -
1.0.6/  24-Jan-2019 13:40    -
2.0.0/  04-Feb-2019 16:11    -
2.0.1/  28-Feb-2019 11:08    -


Thx in advance




Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 3 Weeks Ago at 03:15 PM.. Reason: Added CODE tags.
# 6  
Old 3 Weeks Ago
Getting additional necessary info on this request is like trying to squeeze blood out of a stone - can't you paint the whole picture in one go so we can stop poking in the dark?
Given your listing is in VERSFILE, try
Code:
curl https://altrecmktg.com/artifactory/mediamarketing/release-$(IFS=/ read VERS REST <<<$(tac VERSFILE); echo $VERS)/altrec.tar


Last edited by RudiC; 3 Weeks Ago at 04:37 PM..
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Execution problem with Libtool Versioning control Parameswaran Programming 0 04-10-2013 03:09 AM
Versioning through undelete dextergenious SCO 0 06-26-2012 07:27 AM
File Versioning with Shell Script Brado Shell Programming and Scripting 2 07-19-2011 11:23 AM
Shared library versioning problem at runtime imagtek Programming 1 08-25-2009 04:03 PM
getting value from field dynamically finalight Shell Programming and Scripting 12 05-20-2008 04:13 AM
Any Filesystems in Linux Support Versioning? deckard Linux 7 01-15-2008 03:08 PM
binary versioning francescoandrio Programming 2 10-05-2007 02:09 AM
Solaris versioning mhm4 Solaris 4 02-08-2007 04:16 PM