Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
funkwhale
Manage
Activity
Members
Labels
Plan
Issues
489
Issue boards
Milestones
Wiki
Code
Merge requests
19
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
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
funkwhale
funkwhale
Commits
cf51d37a
Verified
Commit
cf51d37a
authored
5 years ago
by
Eliot Berriot
Browse files
Options
Downloads
Patches
Plain Diff
Added a small json file in documentation to get releases info
parent
3a95957d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!751
Master to develop
,
!700
Added a small json file in documentation to get releases info
Pipeline
#3778
passed with stages
in 4 minutes and 3 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/build_docs.sh
+1
-1
1 addition, 1 deletion
docs/build_docs.sh
docs/get-releases-json.py
+34
-0
34 additions, 0 deletions
docs/get-releases-json.py
with
35 additions
and
1 deletion
docs/build_docs.sh
+
1
−
1
View file @
cf51d37a
#!/bin/bash -eux
# Building sphinx and swagger docs
python
-m
sphinx
.
$BUILD_PATH
TARGET_PATH
=
"
$BUILD_PATH
/swagger"
./build_swagger.sh
python ./get-releases-json.py
>
$BUILD_PATH
/releases.json
This diff is collapsed.
Click to expand it.
docs/get-releases-json.py
0 → 100644
+
34
−
0
View file @
cf51d37a
import
json
import
subprocess
from
distutils.version
import
StrictVersion
def
get_versions
():
output
=
subprocess
.
check_output
(
[
"
git
"
,
"
tag
"
,
"
-l
"
,
"
--format=%(creatordate:iso-strict)|%(refname:short)
"
]
)
tags
=
[]
for
line
in
output
.
decode
().
splitlines
():
try
:
date
,
tag
=
line
.
split
(
"
|
"
)
except
(
ValueError
):
continue
if
not
date
or
not
tag
:
continue
tags
.
append
({
"
id
"
:
tag
,
"
date
"
:
date
})
return
sorted
(
tags
,
key
=
lambda
tag
:
StrictVersion
(
tag
[
"
id
"
]),
reverse
=
True
)
def
main
():
versions
=
get_versions
()
data
=
{
"
count
"
:
len
(
versions
),
"
releases
"
:
versions
}
print
(
json
.
dumps
(
data
))
if
__name__
==
"
__main__
"
:
main
()
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