Skip to content

Commit

Permalink
move marking cloned directory as safe from scripts to CI
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Engel <[email protected]>
  • Loading branch information
engelmi committed Nov 13, 2023
1 parent 790ceb5 commit d814604
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .copr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ installdeps:
dnf -y install gcc gcc-c++ git jq meson systemd-devel rpm-build

srpm: installdeps
git config --global --add safe.directory "$(shell pwd)"
./build-scripts/build-srpm.sh
cp rpmbuild/SRPMS/*.src.rpm $(outdir)
4 changes: 4 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
# Use githash of a tested commit instead of merge commit
ref: ${{ github.event.pull_request.head.sha }}

- name: Mark source directory as safe
run: |
git config --global --add safe.directory $(pwd)
- name: Perform build
run: |
./build-scripts/build-rpm.sh $ARTIFACTS_DIR
Expand Down
1 change: 1 addition & 0 deletions .packit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ srpm_build_deps:

actions:
post-upstream-clone:
- bash -c 'git config --global --add safe.directory $(pwd)'
- bash -c './build-scripts/create-spec.sh'

get-current-version:
Expand Down
3 changes: 0 additions & 3 deletions build-scripts/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ function release(){
# Used for official releases. Increment if necessary
RELEASE="1"
else
# Mark current directory as safe for git to be able to parse git hash
git config --global --add safe.directory $(pwd)

# Used for nightly builds
RELEASE="0.$(date +%04Y%02m%02d%02H%02M).git$(git rev-parse --short ${GITHUB_SHA:-HEAD})"
fi
Expand Down

0 comments on commit d814604

Please sign in to comment.