Modify snapshot/release creation scripts to run autoconf.sh
Then temporarily add the resulting configure and lexor_keywords.cc files to the repository so they will be included in the snapshot and release tarballs that are automatically generated by GitHub. Remove these files in the post-snapshot/post-release cleanup.
This commit is contained in:
parent
23a7c80dde
commit
4471961ed4
|
|
@ -2,11 +2,12 @@
|
|||
|
||||
# This script prepares and tags a release in the git repository. The tag is
|
||||
# based on the first and second argument passed to the script, which should
|
||||
# be the desired major and minor numbers for the release. Before creating
|
||||
# the tag, the version_base.h and verilog.spec files will be updated to
|
||||
# reflect the new release ID and a release_tag.h file will be created in
|
||||
# the top level directory to provide the VERSION_TAG macro. After creating
|
||||
# the tag, the release_tag.h file will be deleted.
|
||||
# be the desired major and minor numbers for the release. Before creating the
|
||||
# tag, autoconf.sh will be run to create the configure and lexor_keyword.cc
|
||||
# files, the version_base.h and verilog.spec files will be updated to reflect
|
||||
# the new release ID and a release_tag.h file will be created in the top level
|
||||
# directory to provide the VERSION_TAG macro. After creating the tag, the
|
||||
# configure, lexor_keywords.cc, and release_tag.h files will be deleted.
|
||||
#
|
||||
# The complete steps to publish a release are:
|
||||
#
|
||||
|
|
@ -43,6 +44,13 @@ if [ -n "$tag_exists" ] ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
echo "Executing autoconf.sh..."
|
||||
sh autoconf.sh
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "autoconf.sh failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Updating version_base.h..."
|
||||
sed -i -E "s/(define\s+VERSION_MAJOR\s+).*/\1$major/" version_base.h
|
||||
sed -i -E "s/(define\s+VERSION_MINOR\s+).*/\1$minor/" version_base.h
|
||||
|
|
@ -57,11 +65,13 @@ echo "Creating release_tag.h..."
|
|||
echo "#define VERSION_TAG \"$tag\"" > release_tag.h
|
||||
|
||||
echo "Adding files and creating the tag..."
|
||||
git add -f configure lexor_keyword.cc vhdlpp/lexor_keyword.cc
|
||||
git add version_base.h verilog.spec release_tag.h
|
||||
git commit -m "Creating release $tag"
|
||||
git tag -a -m "Release $major.$minor" $tag
|
||||
|
||||
echo "Deleting release_tag.h..."
|
||||
echo "Deleting temporary files..."
|
||||
git rm --cached configure lexor_keyword.cc vhdlpp/lexor_keyword.cc
|
||||
git rm release_tag.h
|
||||
git commit -m "Post-release cleanup"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,12 @@
|
|||
|
||||
# This script prepares and tags a snapshot in the git repository. The tag is
|
||||
# based on the current date, e.g. when created on 03-Jan-2025 the tag will be
|
||||
# s20250103. Before creating the tag, the verilog.spec file will be updated
|
||||
# to reflect the snapshot date and a release_tag.h file will be created in
|
||||
# s20250103. Before creating the tag, autoconf.sh will be run to create the
|
||||
# configure and lexor_keyword.cc files, the verilog.spec file will be updated
|
||||
# to reflect the snapshot date, and a release_tag.h file will be created in
|
||||
# the top level directory to provide the VERSION_TAG macro. After creating
|
||||
# the tag, the release_tag.h file will be deleted.
|
||||
# the tag, the configure, lexor_keywords.cc, and release_tag.h files will be
|
||||
# deleted.
|
||||
#
|
||||
# The complete steps to publish a snapshot are:
|
||||
#
|
||||
|
|
@ -25,18 +27,27 @@ if [ -n "$tag_exists" ] ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
echo "Executing autoconf.sh..."
|
||||
sh autoconf.sh
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "autoconf.sh failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Updating verilog.spec..."
|
||||
sed -i -E "s/(define\s+rev_date\s+).*/\1$date/" verilog.spec
|
||||
|
||||
echo "Creating release_tag.h..."
|
||||
echo "#define VERSION_TAG \"$tag\"" > release_tag.h
|
||||
|
||||
echo "Adding modified files and creating the tag..."
|
||||
echo "Adding files and creating the tag..."
|
||||
git add -f configure lexor_keyword.cc vhdlpp/lexor_keyword.cc
|
||||
git add verilog.spec release_tag.h
|
||||
git commit -m "Creating snapshot $tag"
|
||||
git tag -a -m "Snapshot $id" $tag
|
||||
|
||||
echo "Deleting release_tag.h..."
|
||||
echo "Deleting temporary files..."
|
||||
git rm --cached configure lexor_keyword.cc vhdlpp/lexor_keyword.cc
|
||||
git rm release_tag.h
|
||||
git commit -m "Post-snapshot cleanup"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue