Skip to content

Commit

Permalink
Add source revision info (i.e. the Git commit hash of the revision we…
Browse files Browse the repository at this point in the history
… are building) to the 'images/{jdk,jre}/release' files. This feature was previously only implemented for Mercurial.
  • Loading branch information
simonis committed Jan 15, 2018
1 parent 23c53dc commit 1bb5f0a
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions make/SourceRevision.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,28 @@ else

create-source-revision-tracker: $(SOURCE_REVISION_TRACKER)
else
# We don't have a stored source revision. Can't do anything, really.
# Are we using GIT ?
ifneq ($(wildcard $(TOPDIR)/.git), )

store-source-revision:
store-source-revision:
$(call LogInfo, Found Git configuration$(COMMA) using "git log --format=format:%H -1 HEAD^")

$(SOURCE_REVISION_TRACKER):
$(call MakeDir, $(@D))
git -C $(TOPDIR) log --format=format:%H -1 HEAD^ > $@

create-source-revision-tracker: $(SOURCE_REVISION_TRACKER)

else
# We don't have a stored source revision. Can't do anything, really.

store-source-revision:
$(call LogWarn, Error: No mercurial configuration present$(COMMA) cannot create .src-rev)
exit 2

create-source-revision-tracker:
create-source-revision-tracker:
$(call LogWarn, Warning: No mercurial configuration present and no .src-rev)
endif
endif

endif
Expand Down

0 comments on commit 1bb5f0a

Please sign in to comment.