Skip to content

Commit

Permalink
[pkg] add git_commit macro on the fly
Browse files Browse the repository at this point in the history
tar archive created by ci doesn't contain untracked files
  • Loading branch information
nqb committed Nov 26, 2019
1 parent 6bd5848 commit d97d154
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ variables:

.rpm_script:
script:
- cp ${RPM_DIR}/.rpmmacros ${HOME}
# temp
- make conf/git_commit_id
- echo "%git_commit $CI_COMMIT_SHA" >> ${RPM_DIR}/.rpmmacros
- cp ${RPM_DIR}/.rpmmacros ${HOME}
- ci-build-pkg ${RPM_DIR}

.deb_script:
Expand Down
2 changes: 2 additions & 0 deletions rpm/packetfence.spec
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ 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 d97d154

Please sign in to comment.