diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e625823624..3d2d27e5981 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # Preamble #################################################################### # cmake_minimum_required(VERSION 3.15.0) -project(WarpX VERSION 0.20.5) +project(WarpX VERSION 21.02) include(${WarpX_SOURCE_DIR}/cmake/WarpXFunctions.cmake) diff --git a/Docs/source/conf.py b/Docs/source/conf.py index a4129a3044c..d44e138f5da 100644 --- a/Docs/source/conf.py +++ b/Docs/source/conf.py @@ -66,9 +66,9 @@ # built documents. # # The short X.Y version. -version = '20.07' +version = u'21.02' # The full version, including alpha/beta/rc tags. -release = '' +release = u'21.02' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/LICENSE.txt b/LICENSE.txt index 6919ef67a97..39e4c200b7c 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -WarpX v20.07 Copyright (c) 2018, The Regents of the University of California, through Lawrence Berkeley National Laboratory, and Lawrence Livermore National Security, LLC, for the operation of Lawrence Livermore National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved. +WarpX v21.02 Copyright (c) 2018-2021, The Regents of the University of California, through Lawrence Berkeley National Laboratory, and Lawrence Livermore National Security, LLC, for the operation of Lawrence Livermore National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/Tools/Release/newVersion.sh b/Tools/Release/newVersion.sh new file mode 100755 index 00000000000..e0563e0ffe2 --- /dev/null +++ b/Tools/Release/newVersion.sh @@ -0,0 +1,140 @@ +#!/usr/bin/env bash +# +# Copyright 2021 Axel Huebl +# +# This file is part of WarpX.# + +# This file is a maintainer tool to bump the versions inside WarpX' +# source directory at all places where necessary. +# +# Note: this script is only tested with GNUtools (Linux) + +set -eu -o pipefail + + +# Maintainer Inputs ########################################################### + +echo "Hi there, this is a WarpX maintainer tool to update the source" +echo "code of WarpX to a new version number on all places where" +echo "necessary." +echo "For it to work, you need write access on the source directory and" +echo "you should be working in a clean git branch without ongoing" +echo "rebase/merge/conflict resolves and without unstaged changes." + +# check source dir +REPO_DIR=$(cd $(dirname ${BASH_SOURCE})/../../ && pwd) +echo +echo "Your current source directory is: ${REPO_DIR}" +echo + +read -p "Are you sure you want to continue? [y/N] " -r +echo + +if [[ ! ${REPLY} =~ ^[Yy]$ ]] +then + echo "You did not confirm with 'y', aborting." + exit 1 +fi + +echo "We will now run a few sed commands on your source directory." +echo "Please answer the following questions about the version number" +echo "you want to set first:" +echo + +read -p "MAJOR version? (e.g. year: $(date +%y)) " -r +MAJOR=${REPLY} +echo +read -p "MINOR version? (e.g. month: $(date +%m)) " -r +MINOR=${REPLY} +echo +read -p "PATCH version? (e.g. usually empty) " -r +PATCH=${REPLY} +echo +read -p "SUFFIX? (e.g. rc2, dev, ... usually empty) " -r +SUFFIX=${REPLY} +echo + +if [[ -n "${SUFFIX}" ]] +then + SUFFIX_STR="-$SUFFIX" +else + SUFFIX_STR="" +fi +if [[ ! -n "${PATCH}" ]] +then + PATCH="" +fi + +VERSION_STR_NOSUFFIX="${MAJOR}.${MINOR}${PATCH}" +VERSION_STR="${MAJOR}.${MINOR}${PATCH}${SUFFIX_STR}" + +echo +echo "Your new version is: ${VERSION_STR}" +echo + +read -p "Is this information correct? Will now start updating! [y/N] " -r +echo + +if [[ ! ${REPLY} =~ ^[Yy]$ ]] +then + echo "You did not confirm with 'y', aborting." + exit 1 +fi + + +# Updates ##################################################################### + +# CMake scripts +# CMakeLists.txt: project(WarpX VERSION YY.MM) +sed -i -E "s/"\ +"(project\(WarpX VERSION[[:blank:]]+)(.*)(\))/"\ +"\1${VERSION_STR_NOSUFFIX}\3/g" \ + ${REPO_DIR}/CMakeLists.txt + +# cmake/dependencies/AMReX.cmake: +# set(WarpX_amrex_branch "development" ... (future) +# find_package(AMReX YY.MM CONFIG ... +sed -i -E "s/"\ +"(find_package\(AMReX[[:blank:]]+)(.*)([[:blank:]]+CONFIG.+)/"\ +"\1${VERSION_STR_NOSUFFIX}\3/g" \ + ${REPO_DIR}/cmake/dependencies/AMReX.cmake + +# cmake/dependencies/PICSAR.cmake (future) + +# setup.py: version = '21.02', +sed -i -E "s/"\ +"([[:blank:]]*version[[:blank:]]*=[[:blank:]]*')(.*)('.+)/"\ +"\1${VERSION_STR}\3/g" \ + ${REPO_DIR}/setup.py + +# Python/setup.py: version = '21.02', +sed -i -E "s/"\ +"([[:blank:]]*version[[:blank:]]*=[[:blank:]]*')(.*)('.+)/"\ +"\1${VERSION_STR}\3/g" \ + ${REPO_DIR}/Python/setup.py + +# sphinx / RTD +# docs/source/conf.py +sed -i "s/"\ +"[[:blank:]]*version[[:blank:]]*=[[:blank:]]*u.*/"\ +"version = u'${VERSION_STR_NOSUFFIX}'/g" \ + ${REPO_DIR}/Docs/source/conf.py +sed -i "s/"\ +"[[:blank:]]*release[[:blank:]]*=[[:blank:]]*u.*/"\ +"release = u'${VERSION_STR}'/g" \ + ${REPO_DIR}/Docs/source/conf.py + +# LICENSE +# LICENSE.txt: WarpX vYY.MM Copyright (c) 20YY, The Regents of ... +sed -i -E "s/"\ +"(WarpX v)(.*)([[:blank:]]+Copyright \(c\) 2018-)(.*)(, The Regents of.*)/"\ +"\1${VERSION_STR_NOSUFFIX}\3$(date +%Y)\5/g" \ + ${REPO_DIR}/LICENSE.txt + + +# Epilog ###################################################################### + +echo +echo "Done. Please check your source, e.g. via" +echo " git diff" +echo "now and commit the changes if no errors occured." diff --git a/cmake/dependencies/AMReX.cmake b/cmake/dependencies/AMReX.cmake index 74dd9316523..4b9af6d7510 100644 --- a/cmake/dependencies/AMReX.cmake +++ b/cmake/dependencies/AMReX.cmake @@ -155,7 +155,7 @@ macro(find_amrex) endif() set(COMPONENT_PRECISION ${WarpX_PRECISION} P${WarpX_PRECISION}) - find_package(AMReX 21.01 CONFIG REQUIRED COMPONENTS ${COMPONENT_ASCENT} ${COMPONENT_DIM} ${COMPONENT_EB} PARTICLES ${COMPONENT_PIC} ${COMPONENT_PRECISION} TINYP LSOLVERS) + find_package(AMReX 21.02 CONFIG REQUIRED COMPONENTS ${COMPONENT_ASCENT} ${COMPONENT_DIM} ${COMPONENT_EB} PARTICLES ${COMPONENT_PIC} ${COMPONENT_PRECISION} TINYP LSOLVERS) message(STATUS "AMReX: Found version '${AMReX_VERSION}'") endif() endmacro()