Bug 613767
| Summary: | do not perform buildNumber generation based on latest git commit sha unless build files are part of a git working copy | ||
|---|---|---|---|
| Product: | [Other] RHQ Project | Reporter: | Ian Springer <ian.springer> |
| Component: | Build System | Assignee: | RHQ Project Maintainer <rhq-maint> |
| Status: | CLOSED NOTABUG | QA Contact: | Mike Foley <mfoley> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 1.3.1 | CC: | ccrouch, jshaughn |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-06-02 19:15:59 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
ips - was this patch ever applied, and if so, which branches? |
Update the rhq root pom to contain something like the following: + <!-- Use buildnumber plugin only if GIT metadata is present. --> + <profile> + <id>build-number-generation-git</id> + <activation> <file> <exists>.git</exists> </file> </activation> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <executions> + <execution> + <id>generate-build-number-properties</id> + <phase>generate-resources</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>git</executable> + <arguments> + <argument>log</argument> + <argument>--pretty=format:buildNumber = %h</argument> + <argument>-n1</argument> + </arguments> + <outputFile>${project.build.directory}/build-number.properties</outputFile> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile>