#!/usr/bin/env bash

# Copyright (c) 2015 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

path=$( cd "$(dirname "${BASH_SOURCE}")" ; pwd -P )

cd "$path"

if [ -f .version ]; then
    vstring=$(cat .version)
else
    vstring=$(git describe --long --match "v*")
    if [ $? != 0 ]; then
      exit 1
    fi
fi

TAG=$(echo ${vstring} | cut -d- -f1 | sed -e 's/^v//')
ADD=$(echo ${vstring} | cut -s -d- -f2)
POINT=$(echo ${TAG} | cut -d. -f3)

# if this is a "implicit zeroth" release (e.g. 19.08), check if we need to add ".0"
# to fix the artifact versioning sorting
if [ -z "${POINT}" ]; then
    # verify that we are not:
    # - directly on the XX.YY tag (then ADD will equal "0" by its construction)
    # - not on any of the builds past "-rc[123]" but before releases - then ADD will be "rc[123]"
    if [ "${ADD}" != "0" -a "${ADD}" != "rc0" -a "${ADD}" != "rc1" -a "${ADD}" != "rc2" -a "${ADD}" != "rc3" -a "${ADD}" != "rc4" ]; then
	TAG="${TAG}.0"
    fi
fi

git rev-parse 2> /dev/null
if [ $? == 0 ]; then
    CMT=$(git describe --dirty --long --match 'v*'| cut -s -d- -f3,4)
else
    CMT=$(echo ${vstring} | cut -s -d- -f3,4)
fi
CMTR=$(echo $CMT | sed 's/-/_/')

if [ -n "${BUILD_NUMBER}" ]; then
       BLD="~b${BUILD_NUMBER}"
fi

if [ "$1" = "rpm-version" ]; then
  echo ${TAG}
  exit
fi

if [ "$1" = "rpm-release" ]; then
  [ "${ADD}" = "0" ] && echo release && exit
  echo ${ADD}${CMTR:+~${CMTR}}${BLD}
  exit
fi

  if [ "${ADD}" != "0" ]; then
    if [ "$1" = "rpm-string" ]; then
      echo ${TAG}-${ADD}${CMTR:+~${CMTR}}${BLD}
    else
      echo ${TAG}-${ADD}${CMT:+~${CMT}}${BLD}
    fi
  else
    echo ${TAG}-release
fi
