Skip to content

Commit

Permalink
Porting #1541 changes over to the develop branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnHalleyGotway committed Oct 28, 2020
1 parent afdf73b commit e14319e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 deletions.
32 changes: 14 additions & 18 deletions scripts/build/met_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
# This script is called by the
# MET_checkout_and_build.sh script.
#
# The desired version of the code must have alredy
# been checked out prior to calling this script.
# The desired version of the code must have
# already been checked out prior to calling this
# script.
#
# Usage: MET_build <version_number>
#
Expand Down Expand Up @@ -38,32 +39,27 @@ fi

# Check for 0 or 1 arguments
if [ ${NARGS} -eq 0 ]; then
VERSION="met-${CUR_REV}"
VERSION="${CUR_REV}"
elif [ ${NARGS} -eq 1 ]; then
# Prepend met, if needed
if [[ ${1:0:3} != "met" ]]; then
VERSION="met-${1}"
else
VERSION="${1}"
fi
VERSION="${1}"
else
echo
echo "USAGE: MET_build <version>"
echo "USAGE: MET_build <version_number>"
echo
exit 1
fi

# Set the MET build version by stripping off leading "v" from "vX.Y"
export MET_BUILD_VERSION=`echo $VERSION | sed 's/v//g'`
echo "Building MET version '${MET_BUILD_VERSION}'"

# Copy the current met directory
echo "Building version '${VERSION}'..."
cp -r met ${VERSION}
cd ${VERSION}
cp -r met met-${MET_BUILD_VERSION}
cd met-${MET_BUILD_VERSION}

# Cleanup
rm -f `find ./ -name ".gitignore"`

# Set the MET build version for bootstrap by stripping off leading "met-"
export MET_BUILD_VERSION=`echo ${VERSION} | sed 's/met-//g'`

# Run the bootstrap program to prepare for running configure
echo "Running 'bootstrap' to prepare for running configure"
./bootstrap > /dev/null
Expand Down Expand Up @@ -105,8 +101,8 @@ make dist > /dev/null

# Construct the desired name for the tar file. autoconf
# creates the tar file using it's standard naming convention.
TAR_FILE="${VERSION}.${TODAY}.tar.gz"
TAR_FILE="met-${MET_BUILD_VERSION}.${TODAY}.tar.gz"

echo "Copying tar file to new name: '${TAR_FILE}'"
echo "Moving tar file to new name: '${TAR_FILE}'"
mv met-* ../${TAR_FILE}

2 changes: 1 addition & 1 deletion scripts/build/met_checkout_and_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ run_command() {
return ${STATUS}
}

# Run svn info to update contents of version.txt
# Use the Git info to define version.txt
get_git_info() {
echo "CALLING: git config, git rev-parse, and git log"
git config --get remote.origin.url | sed -r 's/^/Repository:\t\t/g' > met/data/version.txt
Expand Down

0 comments on commit e14319e

Please sign in to comment.