Skip to content

Commit

Permalink
Append the git hash number ot the release tag in spec package.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpc-lip6 committed Oct 3, 2024
1 parent 6d1d1bd commit 82244ee
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 5 additions & 3 deletions packaging/coriolis-eda.spec
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ BuildRequires: %{python_module setuptools}

# ALmaLinux 8
%if 0%{?rhel} == 8
%global python3_sitearch /usr/lib64/python3.11/site-packages

BuildRequires: python3.11-devel
%endif

Expand Down Expand Up @@ -154,15 +156,15 @@ Warning: This package is only a stub for now.
cp $RPM_SOURCE_DIR/patchvenv.sh $RPM_SOURCE_DIR/find_files.sh .
chmod u+x patchvenv.sh find_files.sh .
patchVEnvArgs="--use-system-packages"
if [ \( 0%{?fedora} -ge 39 \)
-o\( 0%{?rhel} -eq 8 \)
if [ \( 0%{?fedora} -ge 39 \) \
-o \( 0%{?rhel} -eq 8 \) \
-o \( 0%{?suse_version}%{?sle_version} -ne 0 \) ]; then
patchVEnvArgs="${patchVEnvArgs} --remove-venv-watchfiles"
fi
./patchvenv.sh ${patchVEnvArgs}

make PREFIX=%{_prefix} -f Makefile.LIP6 help install
if [ \( 0%{?sle_version} -eq 150600 \) -a \( 0%{?is_opensuse} -ne 0 \) ]; then
if [ \( 0%{?sle_version} -eq 150600 \) -o \( 0%{?rhel} -eq 8 \) ]; then
%{__mkdir_p} %{buildroot}%{_datadir}/doc
pushd %{buildroot}%{_datadir}/doc
tar zxf %{SOURCE10}
Expand Down
5 changes: 4 additions & 1 deletion packaging/mkArchives.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
}

if [ $# -eq 0 ]; then printHelp; fi


githash=`git log -1 --pretty=format:%h`
doSources="false"
doDocs="false"
doVEnv="false"
Expand All @@ -49,6 +50,7 @@
fi

echo "Running mkArchives.sh"
echo "* Using HEAD githash as release: ${githash}."
if [ "${doSources}" = "true" ]; then
echo "* Making source file archive from Git HEAD ..."
./packaging/git-archive-all.sh -v --prefix coriolis-eda-2.5.5/ --format tar.gz coriolis-eda-${version}.tar.gz
Expand Down Expand Up @@ -87,6 +89,7 @@
fi
done

sed -i "s,^Release: *1,Release: <CI_CNT>.<B_CNT>.${githash}," ${obsDir}/coriolis-eda.spec
if [ "${doCommit}" = "true" ]; then
pushd ${obsDir}
osc commit
Expand Down
1 change: 1 addition & 0 deletions packaging/patchvenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
ls -al /usr/bin/python*

if [ -f .venv/bin/pdm ]; then touch .venv/bin/pdm; fi
if [ -f .venv/bin/meson ]; then touch .venv/bin/meson; fi
if [ -f .venv/bin/pelican ]; then touch .venv/bin/pelican; fi

exit 0

0 comments on commit 82244ee

Please sign in to comment.