Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6675943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:55:29+00:00 2026-05-26T03:55:29+00:00

Well I wanted to know if I could get the latest tag from subversion,

  • 0

Well I wanted to know if I could get the latest tag from subversion, increment it and create the new tag all in one command? Currently I get the latest tag like this:

svn ls http://svn/path/to/tags | tail -n 1

Which gives me something like this:

1.2.34/

then I will create a new tag with the version number of 1.2.35 as I’ve incremented the version number like this:

svn copy http://svn/path/to/trunk http://svn/path/to/tags/1.2.35

from here I just do a switch to point production code to the latest tag.

I know I could write a script to take care of this but I wanted to know if I could do this just from the command line with one command (Chaining the commands). Were I’m stuck is, how do I increment the tag name to the next version number (e.g., from 1.2.34 to 1.2.35)? Version number ranges should follow x.[0-99].[0-99]. Any ideas, help would be great.

Related:

  • http://www.commandlinefu.com/commands/browse
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:55:29+00:00Added an answer on May 26, 2026 at 3:55 am

    The “one liner” to get the next tag would be something like this:

    svn ls http://svn/path/to/tags | \
      sort -t '.' -k 1,1n -k 2,2n -k 3,3n | \
      tail -1|sed 's:/$::' | \
      awk 'BEGIN{FS="."}{print $1 "." $2 "." $3+1}'
    

    … but you should probably just write a script so that you can actually test it. (And yes, I’m aware that the sort and tail and sed and awk could probably all collapse under its own weight into a bit of perl, but you’ll need all those “parts” in there somewhere.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well I know basic Java and wanted to learn Swing so of course looked
I'm all for the skinnier controller, fatter model mindset. I wanted to know how
Well, my website can not redirect to https://www.facebook.com/QuaFootSpa from http://quafootspa.com/ I have tried redirection
Well, i took a break from RoR for studies, now I am back, I
Well, i want house image to rotate from -5° to 5° and i wrote
I am creating a simple register form and I wanted to know if anyone
I need to create a historical timeline starting from 1600's to the present day.
I'm building a game server in Python and I just wanted to get some
I have a localization issue. One of my industrious coworkers has replaced all the
Looking to validate PO Box but wanted to know if such validation existed. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.