Git release generate version number production briefing

Source: Internet
Author: User

Conversion from Pro git Chinese Version

Generate internal version number

Because git does not automatically append an incremental sequence similar to 'v123' for each commit, you can run the GIT describe command to get an easy-to-understand commit number. Git returns a string consisting of three parts:
The version number of the last calibration, plus the number of submissions after that calibration, plus a piece of SHA-1 value of the commityou're describing

$ git describe masterv1.6.2-rc1-20-g8c5b85c

This string can be used as the snapshot name for people to understand. If you download the source code and compile and install git, you will find that the output of the git-version command is similar to that of the string. If you finish
Run the describe command on the submission of the tag. Only the version number of this calibration is obtained without the following two items.
The GIT describe command is only applicable to tagged tags (tags created using the-A or-s option). Therefore, release tags must be labeled, to ensure that git describe can be correctly executed. You can also set this string
As the goal of the checkout or show command, because they all depend on a short SHA-1 value eventually, and of course they will also become invalid if this SHA-1 value fails. Recently, to ensure the uniqueness of the SHA-1 value, the Linux kernel expanded the number of digits from 8 to 10, which caused the previous git describe output to be completely invalid.
Prepare for release

Now you can release a new version. First, archive the code archive to make it easier for people who are not using git. You can use git archive:

$ git archive master --prefix='project/' | gzip > `git describe master`.tar.gz$ ls *.tar.gzv1.6.2-rc1-20-g8c5b85c.tar.gz

The compressed package is extracted from a folder containing the latest code snapshot of your project. You can also create a zip package in a similar way and add the -- format = zip option to git archive:

$ git archive master --prefix='project/' --format=zip > `git describe master`.zip

Now you have a tar.gz package and a zip package. You can upload them to your website or send them to someone else by email.

Prepare a briefing

It is time to notify friends in the email list to test your results. You can use the GIT commit log command to conveniently and quickly create a changelog log, which tells you what features and fixes have been added since the last release.
Bugs. In fact, this command can count all commits within a given range. If your last version was v1.0.1, the following command will give an introduction to all submissions since the last release:

$ git shortlog --no-merges master --not v1.0.1Chris Wanstrath (8):Add support for annotated tags to Grit::TagAdd packed-refs annotated tag support.Add Grit::Commit#to_patchUpdate version and History.txtRemove stray `puts`Make ls_tree ignore nilsTom Preston-Werner (4):fix dates in historydynamic version methodVersion bump to 1.0.2Regenerated gemspec for version 1.0.2

This is the introduction of all submissions since v1.0.1. The content is grouped by authors so that you can quickly send an email to them.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.