Skip to content

Commit d97d154

Browse files
committed
[pkg] add git_commit macro on the fly
tar archive created by ci doesn't contain untracked files
1 parent 6bd5848 commit d97d154

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ variables:
193193

194194
.rpm_script:
195195
script:
196-
- cp ${RPM_DIR}/.rpmmacros ${HOME}
197196
# temp
198-
- make conf/git_commit_id
197+
- echo "%git_commit $CI_COMMIT_SHA" >> ${RPM_DIR}/.rpmmacros
198+
- cp ${RPM_DIR}/.rpmmacros ${HOME}
199199
- ci-build-pkg ${RPM_DIR}
200200

201201
.deb_script:

rpm/packetfence.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ done
352352
%{__make} bin/pfcmd
353353
# build ntlm_auth_wrapper
354354
%{__make} bin/ntlm_auth_wrapper
355+
# Define git_commit_id
356+
echo %{git_commit} > conf/git_commit_id
355357

356358
# build golang binaries
357359
%{__make} -C go all

0 commit comments

Comments
 (0)