Skip to content

Commit

Permalink
put back git_commit_id during build
Browse files Browse the repository at this point in the history
  • Loading branch information
nqb committed Jun 23, 2021
1 parent 58b74d2 commit e1f0efb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -212,18 +212,22 @@ html_install:
cp -v --no-dereference $$link $(DESTDIR)$(PF_PREFIX)/$$link ; \
done

.PHONY: conf/git_commit_id
conf/git_commit_id:
git rev-parse HEAD > $@

.PHONY: rpm/.rpmmacros
rpm/.rpmmacros:
echo "%systemddir /usr/lib/systemd" > $(SRC_RPMDIR)/.rpmmacros
echo "%pf_minor_release $(PF_MINOR_RELEASE)" >> $(SRC_RPMDIR)/.rpmmacros

.PHONY: build_rpm
build_rpm: rpm/.rpmmacros
build_rpm: conf/git_commit_id rpm/.rpmmacros
cp $(SRC_RPMDIR)/.rpmmacros $(HOME)
ci-build-pkg $(SRC_RPMDIR)

.PHONY: build_deb
build_deb:
build_deb: conf/git_commit_id
cp $(SRC_CIDIR)/debian/.devscripts $(HOME)
QUILT_PATCHES=$(SRC_DEBDIR)/patches quilt push
ci-build-pkg $(SRC_DEBDIR)
Expand Down
2 changes: 0 additions & 2 deletions rpm/packetfence.spec
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,6 @@ done
%{__make} bin/pfcmd
# build ntlm_auth_wrapper
%{__make} bin/ntlm_auth_wrapper
# Define git_commit_id
echo %{git_commit} > conf/git_commit_id

# build golang binaries
%{__make} -C go all
Expand Down

0 comments on commit e1f0efb

Please sign in to comment.