Skip to content

volodya-lombrozo/hg-revision-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hg-revision-plugin

codecov

hg-revision-plugin is designed to define properties of a Mercurial repository during maven build. The analysis uses the current state of the repository.

How to use

To use the plugin, add the following configuration to your pom.xml file (to the plugins section).

<plugin>
    <groupId>com.github.volodya-lombrozo</groupId>
    <artifactId>hg-revision-plugin</artifactId>
    <version>0.12</version>
    <executions>
        <execution>
            <phase>
                validate
            </phase>
            <goals>
                <goal>scan</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Properties

Then, after validate phase you will be able to use the next maven properties:

  • hg.author - current commit author
  • hg.branch - current branch name
  • hg.date - time of current commit
  • hg.desc - description (message) of current commit
  • hg.rev - current commit number
  • hg.node - current commit hash
  • hg.bookmarks - bookmarks attached to current commit
  • hg.tags - tags attached to current commit
  • hg.tag - current commit first tag - equal to hg.tags[0]
  • hg.tags[i] - current commit tag by number i
  • hg.tags.previous - previous closest tags attached to parent commit
  • hg.tag.previous - previous closest first tag attached to parent commit - equal to hg.tags.previous[0]
  • hg.tags.previous[i] - previous closest tag by number i attached to parent commit
  • hg.commit.number - commit number in current branch
  • hg.commit.number.from.previous.tag - commit number from previous tag

Logging

By default, the plugin works in quiet mode without logging. In order to enable logging just add the next configuration to execution section.

<configuration>
    <quiet>
        false
    </quiet>
</configuration>

Example

Example project

About

The hg-revision-plugin is designed to get Mercurial repository properties based on the commit history

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages