Commit 7f7a393d authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Some improvements

parent 8747a672
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -64,6 +64,7 @@ Build generateSpecWebSite docker image:
        - generateSpecWebSite/gridTableFilter.py
        - generateSpecWebSite/gridTableFilter.py
        - generateSpecWebSite/gridTableTools.py
        - generateSpecWebSite/gridTableTools.py
        - generateSpecWebSite/indexDownload.md
        - generateSpecWebSite/indexDownload.md
        - generateSpecWebSite/indexReleaseNotes.md
        - generateSpecWebSite/markdownTools.py
        - generateSpecWebSite/markdownTools.py
        - generateSpecWebSite/regexMatches.py
        - generateSpecWebSite/regexMatches.py
        - generateSpecWebSite/spec_on_pages.sh
        - generateSpecWebSite/spec_on_pages.sh
+6 −0
Original line number Original line Diff line number Diff line


Download Release Notes for PROJECT version VERSION:

[![Word](images/Word.png)](SPECWORD)
+88 −71
Original line number Original line Diff line number Diff line
@@ -14,43 +14,53 @@
#toMkdocs.py -> 1
#toMkdocs.py -> 1
echo "toMkdocs.py:" $1
echo "toMkdocs.py:" $1
#$MIKE_ACCESS_TOKEN -> 2
#$MIKE_ACCESS_TOKEN -> 2
echo "MIKE_ACCESS_TOKEN:" $2
MIKE_ACCESS_TOKEN=${2}
echo "MIKE_ACCESS_TOKEN:" ${MIKE_ACCESS_TOKEN}
#CI_SERVER_HOST -> 3
#CI_SERVER_HOST -> 3
echo "CI_SERVER_HOST:" $3
CI_SERVER_HOST=${3}
echo "CI_SERVER_HOST:" ${CI_SERVER_HOST}
#CI_PROJECT_PATH -> 4
#CI_PROJECT_PATH -> 4
echo "CI_PROJECT_PATH:" $4
CI_PROJECT_PATH=${4}
echo "CI_PROJECT_PATH:" ${CI_PROJECT_PATH}
#GITLAB_USER_NAME -> 5
#GITLAB_USER_NAME -> 5
echo "GITLAB_USER_NAME:" $5
GITLAB_USER_NAME=${5}
echo "GITLAB_USER_NAME:" ${GITLAB_USER_NAME}
#GITLAB_USER_EMAIL -> 6
#GITLAB_USER_EMAIL -> 6
echo "GITLAB_USER_EMAIL:" $6
GITLAB_USER_EMAIL=${6}
echo "GITLAB_USER_EMAIL:" ${GITLAB_USER_EMAIL}
#CI_COMMIT_SHA -> 7
#CI_COMMIT_SHA -> 7
echo "CI_COMMIT_SHA:" $7
CI_COMMIT_SHA=${7}
echo "CI_COMMIT_SHA:" ${CI_COMMIT_SHA}
#$SPEC_NAME -> 8
#$SPEC_NAME -> 8
echo "SPEC_NAME:" $8
SPEC_NAME=${8}
echo "SPEC_NAME:" ${SPEC_NAME}
#$CI_PROJECT_NAME -> 9
#$CI_PROJECT_NAME -> 9
echo "CI_PROJECT_NAME:" $9
CI_PROJECT_NAME=${9}
echo "CI_PROJECT_NAME:" ${CI_PROJECT_NAME}
#$TAG_NAME ->10
#$TAG_NAME ->10
echo "TAG_NAME:" ${10}
TAG_NAME=${10}
echo "TAG_NAME:" ${TAG_NAME}
#$CLEAN_WEB_PAGES ->11
#$CLEAN_WEB_PAGES ->11
echo "CLEAN_WEB_PAGES:" ${11}
CLEAN_WEB_PAGES=${11}
echo "CLEAN_WEB_PAGES:" ${CLEAN_WEB_PAGES}


#BACKUP=false
#BACKUP=false
PAGES_BRANCH=gl-pages
PAGES_BRANCH=gl-pages
HTTPS_REMOTE=https://gitlab-ci-token:${2}@${3}/${4}.git
HTTPS_REMOTE=https://gitlab-ci-token:${MIKE_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git


echo "\n------ Install necessary packages --------"
echo "\n------ Install necessary packages --------"
pip install -q mkdocs-material mike rich mkdocs-rss-plugin
pip install -q mkdocs-material mike rich mkdocs-rss-plugin


echo "------ Config git and get the previous GitLab Pages content --------"
echo "------ Config git and get the previous GitLab Pages content --------"
git config --global --replace-all user.name "$5"
git config --global --replace-all user.name "${GITLAB_USER_NAME}"
git config --global --replace-all user.email $6
git config --global --replace-all user.email "${GITLAB_USER_EMAIL}"
git fetch origin $PAGES_BRANCH && git checkout $PAGES_BRANCH || git checkout -b $PAGES_BRANCH origin/$PAGES_BRANCH || echo "Pages branch not deployed yet."
git fetch origin $PAGES_BRANCH && git checkout $PAGES_BRANCH || git checkout -b $PAGES_BRANCH origin/$PAGES_BRANCH || echo "Pages branch not deployed yet."
git checkout $7
git checkout ${CI_COMMIT_SHA}


####### GENERATE NAV SPEC #######
####### GENERATE NAV SPEC #######
echo "------ Process MD Spec --------"
echo "------ Process MD Spec --------"
frontmatterClause=False
frontmatterClause=False
python3 /markdownTools/processMDSpec.py -fmo "./$8.md" -fmf frontmatter.md
python3 /markdownTools/processMDSpec.py -fmo "./${SPEC_NAME}.md" -fmf frontmatter.md
if [ -f "frontmatter.md" ] && [ "$(cat frontmatter.md | tr -d ' \n\t')" != "{}" ]; then
if [ -f "frontmatter.md" ] && [ "$(cat frontmatter.md | tr -d ' \n\t')" != "{}" ]; then
  echo "------ Adding frontmatter to spec.md --------"
  echo "------ Adding frontmatter to spec.md --------"
  python3 /generateSpecWebSite/create_frontmatter_table.py frontmatter.md spec.md
  python3 /generateSpecWebSite/create_frontmatter_table.py frontmatter.md spec.md
@@ -58,58 +68,65 @@ if [ -f "frontmatter.md" ] && [ "$(cat frontmatter.md | tr -d ' \n\t')" != "{}"
  cat spec.md
  cat spec.md
  frontmatterClause=True
  frontmatterClause=True
fi
fi
python3 /markdownTools/processMDSpec.py "./$8.md" > combined.md
python3 /markdownTools/processMDSpec.py "./${SPEC_NAME}.md" > combined.md
echo "------ Generate input for mkdocs --------"
echo "------ Generate input for mkdocs --------"
#python3 $1 -it -ihp --title ${9^^} "./$8.md"
#python3 $1 -it -ihp --title ${9^^} "./$8.md"
if [ $frontmatterClause == True ]; then
if [ $frontmatterClause == True ]; then
  cat ./combined.md >> ./spec.md
  cat ./combined.md >> ./spec.md
  python3 /generateSpecWebSite/toMkdocs.py -it -ihp --title ${9^^} "./spec.md"
  python3 /generateSpecWebSite/toMkdocs.py -it -ihp --title ${CI_PROJECT_NAME^^} "./spec.md"
else
else
  python3 /generateSpecWebSite/toMkdocs.py -it -ihp --title ${9^^} "./$8.md"
  python3 /generateSpecWebSite/toMkdocs.py -it -ihp --title ${CI_PROJECT_NAME^^} "./${SPEC_NAME}.md"
fi
fi
ls ${9^^}
ls ${CI_PROJECT_NAME^^}
echo "------ Move to docs folder --------"
echo "------ Move to docs folder --------"
mv ${9^^}/* docs/
mv ${CI_PROJECT_NAME^^}/* docs/
sed -i 's/'${9^^}'\///g' _nav.yml
sed -i 's/'${CI_PROJECT_NAME^^}'\///g' _nav.yml
cat _nav.yml
cat _nav.yml
echo "  - 'Home': 'index.md'" >> mkdocs.yml
echo "  - 'Home': 'index.md'" >> mkdocs.yml
cat _nav.yml >> mkdocs.yml
cat _nav.yml >> mkdocs.yml
cp docs/0.md docs/index.md
cp docs/0.md docs/index.md
## Create download tab if official baseline version
## Create download tab if official baseline version
if [[ ${10} == v* ]]; then
if [[ ${TAG_NAME} == v* ]]; then
    echo "\nAdding download tab for version ${10}..."
    echo "\nAdding download tab for version ${TAG_NAME}..."
    mkdir -p "docs/download"
    mkdir -p "docs/download"
    mv "baseline/$8_${10}.docx" docs/download
    mv "baseline/${SPEC_NAME}_${TAG_NAME}.docx" docs/download
    spec_name=$(echo ${8/&/and})
    spec_name=$(echo ${SPEC_NAME/&/and})
    file_name=$(ls docs/download/*.docx)
    file_name=$(ls docs/download/*.docx)
    filename_corrected=$(echo ${file_name/&/and})
    filename_corrected=$(echo ${file_name/&/and})
    mv docs/download/"$8_${10}.docx" ${filename_corrected}
    mv docs/download/"${SPEC_NAME}_${TAG_NAME}.docx" ${filename_corrected}
    mv "baseline/$8_${10}.pdf" docs/download
    mv "baseline/${SPEC_NAME}_${TAG_NAME}.pdf" docs/download
    spec_name=$(echo ${8/&/and})
    spec_name=$(echo ${SPEC_NAME/&/and})
    file_name=$(ls docs/download/*.pdf)
    file_name=$(ls docs/download/*.pdf)
    filename_corrected=$(echo ${file_name/&/and})
    filename_corrected=$(echo ${file_name/&/and})
    mv docs/download/"$8_${10}.pdf" ${filename_corrected}
    mv docs/download/"${SPEC_NAME}_${TAG_NAME}.pdf" ${filename_corrected}
    mv "baseline/$8_${10}.epub" docs/download
    mv "baseline/${SPEC_NAME}_${TAG_NAME}.epub" docs/download
    spec_name=$(echo ${8/&/and})
    spec_name=$(echo ${SPEC_NAME/&/and})
    file_name=$(ls docs/download/*.epub)
    file_name=$(ls docs/download/*.epub)
    filename_corrected=$(echo ${file_name/&/and})
    filename_corrected=$(echo ${file_name/&/and})
    mv docs/download/"$8_${10}.epub" ${filename_corrected}
    mv docs/download/"${SPEC_NAME}_${TAG_NAME}.epub" ${filename_corrected}
    echo ${spec_name}
    echo ${spec_name}
    #for x in docs/download/*"&"*; do   mv -- "$x" "${x//&/and}"; done
    #for x in docs/download/*"&"*; do   mv -- "$x" "${x//&/and}"; done
    sed -i 's/PROJECT/'${9^^}'/g' docs/download/index.md
    sed -i 's/PROJECT/'${CI_PROJECT_NAME^^}'/g' docs/download/index.md
    sed -i 's/SPECWORD/'"${spec_name}_${10}.docx"'/g' docs/download/index.md
    sed -i 's/SPECWORD/'"${spec_name}_${TAG_NAME}.docx"'/g' docs/download/index.md
    sed -i 's/SPECPDF/'"${spec_name}_${10}.pdf"'/g' docs/download/index.md
    sed -i 's/SPECPDF/'"${spec_name}_${TAG_NAME}.pdf"'/g' docs/download/index.md
    sed -i 's/SPECEPUB/'"${spec_name}_${10}.epub"'/g' docs/download/index.md
    sed -i 's/SPECEPUB/'"${spec_name}_${TAG_NAME}.epub"'/g' docs/download/index.md
    sed -i 's/VERSION/'${10}'/g' docs/download/index.md
    sed -i 's/VERSION/'${TAG_NAME}'/g' docs/download/index.md
    echo "  - Download: 'download/index.md'" >> mkdocs.yml
    echo "  - Download: 'download/index.md'" >> mkdocs.yml
    echo "\nAdding release notes tab for version ${TAG_NAME}..."
    mkdir -p "docs/release_notes"
    mv "baseline/Release_Notes_${TAG_NAME}.docx" docs/release_notes
    sed -i 's/PROJECT/'${CI_PROJECT_NAME^^}'/g' docs/release_notes/index.md
    sed -i 's/VERSION/'${TAG_NAME}'/g' docs/release_notes/index.md
    sed -i 's/SPECWORD/'"Release_Notes_${TAG_NAME}.docx"'/g' docs/release_notes/index.md
    echo "  - Release Notes: 'release_notes/index.md'" >> mkdocs.yml
fi
fi


if [ ${11} == "false" ]; then
if [ ${CLEAN_WEB_PAGES} == "false" ]; then
    echo "------ Generating site --------"
    echo "------ Generating site --------"
    echo "Generating docs version ${10}..."
    echo "Generating docs version ${TAG_NAME}..."
    majorVersion=$(echo ${10} | grep -o v[0-9]*\. | grep -o [0-9]*)
    majorVersion=$(echo ${TAG_NAME} | grep -o v[0-9]*\. | grep -o [0-9]*)
    interVersion=$(echo ${10} | cut -d. -f2)
    interVersion=$(echo ${TAG_NAME} | cut -d. -f2)
    minorVersion=$(echo ${10} | cut -d. -f3)
    minorVersion=$(echo ${TAG_NAME} | cut -d. -f3)
    echo "Major version is ${majorVersion}"
    echo "Major version is ${majorVersion}"
    if [ -n "${majorVersion}" ]; then
    if [ -n "${majorVersion}" ]; then
        releaseVersion="latestR${majorVersion}"
        releaseVersion="latestR${majorVersion}"
@@ -118,11 +135,11 @@ if [ ${11} == "false" ]; then


    if [ -z "${majorVersion}" ] || [ -z "${interVersion}" ] || [ -z "${minorVersion}" ]; then
    if [ -z "${majorVersion}" ] || [ -z "${interVersion}" ] || [ -z "${minorVersion}" ]; then
        echo "Deploying non-versioned documents..."
        echo "Deploying non-versioned documents..."
        mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH ${10}
        mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH ${TAG_NAME}
    else
    else
      isPagesSet=$(mike list --deploy-prefix public -r $HTTPS_REMOTE -b $PAGES_BRANCH)
      isPagesSet=$(mike list --deploy-prefix public -r $HTTPS_REMOTE -b $PAGES_BRANCH)
      if [ -z "${isPagesSet}" ]; then
      if [ -z "${isPagesSet}" ]; then
          mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10} ${releaseVersion} latest
          mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${TAG_NAME} ${releaseVersion} latest
          mike set-default --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH latest #That's only needed the first time gl-pages is created
          mike set-default --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH latest #That's only needed the first time gl-pages is created
      else
      else
          latestVersionDeployed=$(mike list --deploy-prefix public -r $HTTPS_REMOTE -b $PAGES_BRANCH | grep ${releaseVersion} | cut -d" " -f1)
          latestVersionDeployed=$(mike list --deploy-prefix public -r $HTTPS_REMOTE -b $PAGES_BRANCH | grep ${releaseVersion} | cut -d" " -f1)
@@ -134,51 +151,51 @@ if [ ${11} == "false" ]; then


          ##Handling versions: update latestRelease and latest (majorVersion updated)
          ##Handling versions: update latestRelease and latest (majorVersion updated)
          if [[ "${releaseVersion}" > "${latestRelease}" ]]; then
          if [[ "${releaseVersion}" > "${latestRelease}" ]]; then
              echo "Upgrade latest release...deploying version ${10} as latest and ${releaseVersion}"
              echo "Upgrade latest release...deploying version ${TAG_NAME} as latest and ${releaseVersion}"
              mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10} ${releaseVersion} latest
              mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${TAG_NAME} ${releaseVersion} latest
          elif [[ "${releaseVersion}" == "${latestRelease}" ]]; then
          elif [[ "${releaseVersion}" == "${latestRelease}" ]]; then
              if [[ ${latestVersionDeployed_inter} == ${interVersion} ]]; then
              if [[ ${latestVersionDeployed_inter} == ${interVersion} ]]; then
                if [[ ${latestVersionDeployed_minor} < ${minorVersion} || ${latestVersionDeployed_minor} == ${minorVersion} ]]; then
                if [[ ${latestVersionDeployed_minor} < ${minorVersion} || ${latestVersionDeployed_minor} == ${minorVersion} ]]; then
                  echo "Upgrade latest release...deploying version ${10} as latest and ${releaseVersion}"
                  echo "Upgrade latest release...deploying version ${TAG_NAME} as latest and ${releaseVersion}"
                  mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10} ${releaseVersion} latest
                  mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${TAG_NAME} ${releaseVersion} latest
                  if [[ ${latestVersionDeployed_minor} < ${minorVersion} ]]; then
                  if [[ ${latestVersionDeployed_minor} < ${minorVersion} ]]; then
                    echo "Hidding version ${latestVersionDeployed}..."
                    echo "Hidding version ${latestVersionDeployed}..."
                    mike props --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH --set hidden=true "${latestVersionDeployed}"
                    mike props --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH --set hidden=true "${latestVersionDeployed}"
                  fi
                  fi
                else
                else
                  echo "Deploying version ${10}"
                  echo "Deploying version ${TAG_NAME}"
                  mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10}
                  mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${TAG_NAME}
                  echo "Hidding version ${10}..."
                  echo "Hidding version ${TAG_NAME}..."
                  mike props --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH --set hidden=true "${10}"
                  mike props --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH --set hidden=true "${TAG_NAME}"
                fi
                fi
              elif [[ ${latestVersionDeployed_inter} < ${interVersion} ]]; then
              elif [[ ${latestVersionDeployed_inter} < ${interVersion} ]]; then
                echo "Upgrade latest release...deploying version ${10} as latest and ${releaseVersion}"
                echo "Upgrade latest release...deploying version ${TAG_NAME} as latest and ${releaseVersion}"
                mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10} ${releaseVersion} latest
                mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${TAG_NAME} ${releaseVersion} latest
              else
              else
                echo "Deploying version ${10}"
                echo "Deploying version ${TAG_NAME}"
                mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10}
                mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${TAG_NAME}
              fi
              fi
          else
          else
            if [[ ${latestVersionDeployed_inter} == ${interVersion} ]]; then
            if [[ ${latestVersionDeployed_inter} == ${interVersion} ]]; then
              if [[ ${latestVersionDeployed_minor} < ${minorVersion} || ${latestVersionDeployed_minor} == ${minorVersion} ]]; then
              if [[ ${latestVersionDeployed_minor} < ${minorVersion} || ${latestVersionDeployed_minor} == ${minorVersion} ]]; then
                echo "Deploying version ${10} as ${releaseVersion}"
                echo "Deploying version ${TAG_NAME} as ${releaseVersion}"
                mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10} ${releaseVersion}
                mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${TAG_NAME} ${releaseVersion}
                if [[ ${latestVersionDeployed_minor} < ${minorVersion} ]]; then
                if [[ ${latestVersionDeployed_minor} < ${minorVersion} ]]; then
                  echo "Hidding version ${latestVersionDeployed}..."
                  echo "Hidding version ${latestVersionDeployed}..."
                  mike props --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH --set hidden=true "${latestVersionDeployed}"
                  mike props --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH --set hidden=true "${latestVersionDeployed}"
                fi
                fi
              else
              else
                echo "Deploying version ${10}"
                echo "Deploying version ${TAG_NAME}"
                mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10}
                mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${TAG_NAME}
                echo "Hidding version ${10}..."
                echo "Hidding version ${TAG_NAME}..."
                mike props --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH --set hidden=true "${10}"
                mike props --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH --set hidden=true "${TAG_NAME}"
              fi
              fi
            elif [[ ${latestVersionDeployed_inter} < ${interVersion} ]]; then
            elif [[ ${latestVersionDeployed_inter} < ${interVersion} ]]; then
                echo "Deploying version ${10} as ${releaseVersion}"
                echo "Deploying version ${TAG_NAME} as ${releaseVersion}"
                mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10} ${releaseVersion}
                mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${TAG_NAME} ${releaseVersion}
            else
            else
                echo "Deploying version ${10}"
                echo "Deploying version ${TAG_NAME}"
                mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10}
                mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${TAG_NAME}
            fi
            fi
          fi
          fi


@@ -193,16 +210,16 @@ if [ ${11} == "false" ]; then
    fi
    fi
else
else
    echo "------ Removing docs version  }..."
    echo "------ Removing docs version  }..."
    majorVersion=$(echo ${11} | grep -o v[0-9]*\. | grep -o [0-9]*)
    majorVersion=$(echo ${CLEAN_WEB_PAGES} | grep -o v[0-9]*\. | grep -o [0-9]*)
    if [ -n "${majorVersion}" ]; then
    if [ -n "${majorVersion}" ]; then
        previousVersion=$(mike list --deploy-prefix public -r $HTTPS_REMOTE -b $PAGES_BRANCH | grep v${majorVersion} | grep -A1 ${11} | grep -v ${11})
        previousVersion=$(mike list --deploy-prefix public -r $HTTPS_REMOTE -b $PAGES_BRANCH | grep v${majorVersion} | grep -A1 ${CLEAN_WEB_PAGES} | grep -v ${CLEAN_WEB_PAGES})
        releaseVersion="latestR${majorVersion}"
        releaseVersion="latestR${majorVersion}"
        echo "Major version is ${majorVersion}"
        echo "Major version is ${majorVersion}"
        echo "Previous version is ${previousVersion}"
        echo "Previous version is ${previousVersion}"
    fi
    fi


    isLatest=$(mike list --deploy-prefix public -r $HTTPS_REMOTE -b $PAGES_BRANCH ${11} | grep -o latest\, )
    isLatest=$(mike list --deploy-prefix public -r $HTTPS_REMOTE -b $PAGES_BRANCH ${CLEAN_WEB_PAGES} | grep -o latest\, )
    isLatestRelease=$(mike list --deploy-prefix public -r $HTTPS_REMOTE -b $PAGES_BRANCH ${11} | grep -o ${releaseVersion} )
    isLatestRelease=$(mike list --deploy-prefix public -r $HTTPS_REMOTE -b $PAGES_BRANCH ${CLEAN_WEB_PAGES} | grep -o ${releaseVersion} )
    echo "This is isLatest: $isLatest"
    echo "This is isLatest: $isLatest"
    echo "This is isLatestRelease: $isLatestRelease"
    echo "This is isLatestRelease: $isLatestRelease"
    ## Deal with alias latest
    ## Deal with alias latest
@@ -232,7 +249,7 @@ else
        fi #Deal with moving down a release
        fi #Deal with moving down a release
    fi
    fi


    mike delete --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH ${11}
    mike delete --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH ${CLEAN_WEB_PAGES}
fi
fi


git checkout $PAGES_BRANCH -- public/
git checkout $PAGES_BRANCH -- public/