I am setting up a Continuous Integration job that patches an external library and releases the patched version locally.
However, the external library uses TRUNK for development, and I would like my CI job to automatically select the latest release tag for checkout.
Does SVN have that functionality?
(bash Shell Scripts are ok)
To find information about the history of a file or directory, use the svn log command. svn log will provide you with a record of who made changes to a file or directory, at what revision it changed, the time and date of that revision, and, if it was provided, the log message that accompanied the commit.
A tag is just a “snapshot” of a project in time. In Subversion, this idea already seems to be everywhere. Each repository revision is exactly that—a snapshot of the filesystem after each commit. However, people often want to give more human-friendly names to tags, such as release-1.0 .
Subversion does not have special commands for branching or tagging, but uses so-called “cheap copies” instead. Cheap copies are similar to hard links in Unix, which means that instead of making a complete copy in the repository, an internal link is created, pointing to a specific tree/revision.
Hm...What about the following:
svn log URL/tags --limit 1
will print out the last tag.
This will work if nothing better can be found:
svn log -v <tagsurl> | awk '/^ A/ { print $2 }' | grep -v RC | head -1
(the grep -v RC part strips release candidates)
Source: this answer to a previous question
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With