Skip to content
Snippets Groups Projects
Commit fd0dfa13 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Fix publish version pages algorithm

parent f95fbcf3
No related branches found
No related tags found
No related merge requests found
......@@ -117,36 +117,45 @@ if [ ${11} == "false" ]; then
echo "Latest deployed version for this release is ${latestVersionDeployed}"
##Handling versions: update latestRelease and latest (majorVersion updated)
if [[ "${latest}" > "${latestRelease}" || "${latest}" == "${latestRelease}" ]]; then
if [[ ${latestVersionDeployed_inter} < ${interVersion} || ${latestVersionDeployed_inter} == ${interVersion} ]]; then
if [[ "${latest}" > "${latestRelease}" ]]; then
echo "Upgrade latest release...deploying version ${10} as latest and ${latest}"
mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10} ${latest} latest
elif [[ "${latest}" == "${latestRelease}" ]]; then
if [[ ${latestVersionDeployed_inter} == ${interVersion} ]]; then
if [[ ${latestVersionDeployed_minor} < ${minorVersion} || ${latestVersionDeployed_minor} == ${minorVersion} ]]; then
echo "Upgrade latest release...deploying version ${10} as latest and ${latest}"
mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10} ${latest} latest
echo "Hidding version ${latestVersionDeployed}..."
mike props --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH --set hidden=true "${latestVersionDeployed}"
else
echo "Deploying version ${10}"
mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10}
if [[ ${latestVersionDeployed_inter} == ${interVersion} ]]; then
echo "Hidding version ${10}..."
mike props --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH --set hidden=true "${10}"
fi
fi
elif [[ ${latestVersionDeployed_inter} < ${interVersion} ]]; then
echo "Upgrade latest release...deploying version ${10} as latest and ${latest}"
mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10} ${latest} latest
else
echo "Deploying version ${10}"
mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10}
fi
else
if [[ ${latestVersionDeployed_inter} < ${interVersion} || ${latestVersionDeployed_inter} == ${interVersion} ]]; then
if [[ ${latestVersionDeployed_inter} == ${interVersion} ]]; then
if [[ ${latestVersionDeployed_minor} < ${minorVersion} || ${latestVersionDeployed_minor} == ${minorVersion} ]]; then
echo "Deploying version ${10} as ${latest}"
mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10} ${latest}
echo "Hidding version ${latestVersionDeployed}..."
mike props --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH --set hidden=true "${latestVersionDeployed}"
else
echo "Deploying version ${10}"
mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10}
if [[ ${latestVersionDeployed_inter} == ${interVersion} ]]; then
echo "Hidding version ${10}..."
mike props --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH --set hidden=true "${10}"
fi
fi
elif [[ ${latestVersionDeployed_inter} < ${interVersion} ]]; then
echo "Deploying version ${10} as ${latest}"
mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10} ${latest}
else
echo "Deploying version ${10}"
mike deploy --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH -u ${10}
......@@ -154,12 +163,12 @@ if [ ${11} == "false" ]; then
fi
##Handling versions: hide version with editorial changes (minorVersion updated)
if [[ ${latestVersionDeployed_inter} == ${interVersion} ]]; then
if [[ ${latestVersionDeployed_minor} < ${minorVersion} ]]; then
echo "Hidding version ${latestVersionDeployed}..."
mike props --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH --set hidden=true "${latestVersionDeployed}"
fi
fi
#if [[ ${latestVersionDeployed_inter} == ${interVersion} ]]; then
# if [[ ${latestVersionDeployed_minor} < ${minorVersion} ]]; then
# echo "Hidding version ${latestVersionDeployed}..."
# mike props --deploy-prefix public -r $HTTPS_REMOTE -p -b $PAGES_BRANCH --set hidden=true "${latestVersionDeployed}"
# fi
#fi
fi
fi
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment