Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Specification Tools
Scripts
Commits
fd0dfa13
Commit
fd0dfa13
authored
7 months ago
by
Miguel Angel Reina Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Fix publish version pages algorithm
parent
f95fbcf3
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
spec_on_pages.sh
+26
-17
26 additions, 17 deletions
spec_on_pages.sh
with
26 additions
and
17 deletions
spec_on_pages.sh
+
26
−
17
View file @
fd0dfa13
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment