Bug 613767 - do not perform buildNumber generation based on latest git commit sha unless build files are part of a git working copy
do not perform buildNumber generation based on latest git commit sha unless b...
Status: CLOSED NOTABUG
Product: RHQ Project
Classification: Other
Component: Build System (Show other bugs)
1.3.1
All All
low Severity low (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-12 15:14 EDT by Ian Springer
Modified: 2014-06-02 15:15 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-02 15:15:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ian Springer 2010-07-12 15:14:40 EDT
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>
Comment 1 Ian Springer 2010-07-12 15:16:45 EDT
See also https://jira.jboss.org/browse/EMBJOPR-299.
Comment 2 Corey Welton 2010-09-28 08:40:13 EDT
 ips - was this patch ever applied, and if so, which branches?

Note You need to log in before you can comment on or make changes to this bug.