From af6bf0d22631af375719f5b48d15383362c6adeb Mon Sep 17 00:00:00 2001 From: Giovanni Bussi Date: Mon, 29 Aug 2022 23:01:25 +0200 Subject: [PATCH 1/2] Renamed version file VERSION can create clashes with a c++ include file on non-case-sensitive systems (e.g. MacOS) --- README.md | 2 +- VERSION => VERSION.txt | 0 python/Makefile | 6 +++--- python/setup.py | 2 +- release.sh | 10 +++++----- src/lib/Makefile | 2 +- src/maketools/update-config-txt.sh | 8 ++++---- src/maketools/update-version.sh | 14 +++++++------- 8 files changed, 22 insertions(+), 22 deletions(-) rename VERSION => VERSION.txt (100%) diff --git a/README.md b/README.md index 108f670aa1..e11d979b85 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ Here's a description of the content of each file and directory in the root PLUME Makefile.conf.in : template configuration makefile PEOPLE : list of authors README.md : this file - VERSION : version file + VERSION.txt : version file astyle : a local version of astyle, used to format code configure : configuration script configure.ac : configuration script (autoconf) diff --git a/VERSION b/VERSION.txt similarity index 100% rename from VERSION rename to VERSION.txt diff --git a/python/Makefile b/python/Makefile index 967955d2d0..1ed692191b 100644 --- a/python/Makefile +++ b/python/Makefile @@ -3,7 +3,7 @@ ifneq ($(MAKECMDGOALS),clean) -include ../Makefile.conf endif -VERSION = $(shell if test -f ../VERSION ; then grep -v \\\# ../VERSION ; else echo "Unknown" ; fi ) +VERSION = $(shell if test -f ../VERSION.txt ; then grep -v \\\# ../VERSION.txt ; else echo "Unknown" ; fi ) .PHONY: all clean install @@ -29,7 +29,7 @@ all: endif pip: - cp ../VERSION ./PLUMED_VERSION + cp ../VERSION.txt ./PLUMED_VERSION mkdir -p include cp ../src/wrapper/Plumed.h include/ @@ -45,6 +45,6 @@ pypi: cp -r test pypi/ cp ../src/wrapper/Plumed.h pypi/include/ cp README.rst MANIFEST.in cplumed.pxd plumed.pyx setup.py pypi/ - cp ../VERSION pypi/PLUMED_VERSION + cp ../VERSION.txt pypi/PLUMED_VERSION cd pypi ; $(python_bin) setup.py sdist echo "now use: $(python_bin) -m twine upload dist/plumed-$(VERSION).tar.gz" diff --git a/python/setup.py b/python/setup.py index cd3b30e83d..3ddb112316 100644 --- a/python/setup.py +++ b/python/setup.py @@ -40,7 +40,7 @@ def is_platform_mac(): return sys.platform == 'darwin' if os.getenv("plumed_macports") is not None: - copyfile("../VERSION","PLUMED_VERSION") + copyfile("../VERSION.txt","PLUMED_VERSION") try: os.mkdir("include") except OSError: diff --git a/release.sh b/release.sh index 6844af20bd..e480cc4c08 100755 --- a/release.sh +++ b/release.sh @@ -137,13 +137,13 @@ if ! test "$VALIDATED" ; then else update_changelog CHANGES/v$shortversion.md $version $shortversion "$(date '+%b %e, %Y' | sed 's/ / /g')" { - grep \# VERSION + grep \# VERSION.txt echo $version } > VERSION.tmp - mv VERSION.tmp VERSION + mv VERSION.tmp VERSION.txt echo "Here's the new VERSION file:" echo "***" - cat VERSION + cat VERSION.txt echo "***" msg="Release v$version " @@ -152,7 +152,7 @@ else echo "I will use the following commands:" echo "***" echo "git add CHANGES/v$shortversion.md" - echo "git add VERSION" + echo "git add VERSION.txt" echo "git commit --allow-empty -m \"$msg\"" echo "git tag v$version" echo "git push origin v$version" @@ -160,7 +160,7 @@ else echo "***" confirm || exit git add CHANGES/v$shortversion.md - git add VERSION + git add VERSION.txt git commit --allow-empty -m "$msg" git tag v$version git push origin v$shortversion v$version diff --git a/src/lib/Makefile b/src/lib/Makefile index 476eab36e2..1c0cab1aaa 100644 --- a/src/lib/Makefile +++ b/src/lib/Makefile @@ -1,6 +1,6 @@ # version number -VERSION = $(shell if test -f ../../VERSION ; then grep -v \\\# ../../VERSION ; else echo "Unknown" ; fi ) +VERSION = $(shell if test -f ../../VERSION.txt ; then grep -v \\\# ../../VERSION.txt ; else echo "Unknown" ; fi ) # here we build the list of modules to be linked in plumedKernel KERNEL_MODULES := $(addprefix ../,$(shell ../maketools/find_modules.sh)) diff --git a/src/maketools/update-config-txt.sh b/src/maketools/update-config-txt.sh index cf0df8cfb2..aea2e652cd 100755 --- a/src/maketools/update-config-txt.sh +++ b/src/maketools/update-config-txt.sh @@ -6,16 +6,16 @@ file="$1" # version strings: version=$( echo "version short $( - if test -f ../../VERSION ; then - grep -v "#" ../../VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/' + if test -f ../../VERSION.txt ; then + grep -v "#" ../../VERSION.txt | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/' else echo "Unknown" fi )" echo "version long $( - if test -f ../../VERSION ; then - grep -v "#" ../../VERSION + if test -f ../../VERSION.txt ; then + grep -v "#" ../../VERSION.txt else echo "Unknown" fi diff --git a/src/maketools/update-version.sh b/src/maketools/update-version.sh index 50ed9d97e2..06693a2cfe 100755 --- a/src/maketools/update-version.sh +++ b/src/maketools/update-version.sh @@ -4,16 +4,16 @@ echo "#ifndef __PLUMED_config_version_h" echo "#define __PLUMED_config_version_h" echo "#define PLUMED_VERSION_SHORT \"$( - if test -f ../../VERSION ; then - grep -v "#" ../../VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/' + if test -f ../../VERSION.txt ; then + grep -v "#" ../../VERSION.txt | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/' else echo "Unknown" fi )\"" echo "#define PLUMED_VERSION_LONG \"$( - if test -f ../../VERSION ; then - grep -v "#" ../../VERSION + if test -f ../../VERSION.txt ; then + grep -v "#" ../../VERSION.txt else echo "Unknown" fi @@ -29,15 +29,15 @@ echo "#define PLUMED_VERSION_GIT \"$( )\"" echo "#define PLUMED_VERSION_MAJOR $( - grep -v "#" ../../VERSION | sed 's/^\([0-9][0-9]*\).*/\1/' + grep -v "#" ../../VERSION.txt | sed 's/^\([0-9][0-9]*\).*/\1/' )" echo "#define PLUMED_VERSION_MINOR $( - grep -v "#" ../../VERSION | sed 's/^[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/' + grep -v "#" ../../VERSION.txt | sed 's/^[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/' )" echo "#define PLUMED_VERSION_PATCH $( - grep -v "#" ../../VERSION | sed 's/^[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/' + grep -v "#" ../../VERSION.txt | sed 's/^[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/' )" echo "#endif" From 4dcd7949cbeceed1e48e9cc0819be531978e955a Mon Sep 17 00:00:00 2001 From: Giovanni Bussi Date: Tue, 30 Aug 2022 00:21:42 +0200 Subject: [PATCH 2/2] updated macsimple to macos 11 --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7902efaec1..a0592b6ef7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -214,8 +214,7 @@ jobs: #done macsimple: - # still needs some fix to be upgraded to macos-11 - runs-on: macos-10.15 + runs-on: macos-11 steps: - uses: actions/checkout@v2 - name: Set paths