Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
Website
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Borg Binary Builder
Website
Commits
573b1325
Unverified
Commit
573b1325
authored
Oct 14, 2020
by
noplanman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add unstable builds with a link to display them
parent
011ebf92
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
10 deletions
+31
-10
_assets/styles.css
_assets/styles.css
+3
-0
index.php
index.php
+28
-10
No files found.
_assets/styles.css
View file @
573b1325
This diff is collapsed.
Click to expand it.
index.php
View file @
573b1325
...
...
@@ -27,6 +27,14 @@ function get_binary_files()
{
$files
=
[];
foreach
(
get_bintray_files_cache
()
??
[]
as
$file
)
{
$stability
=
'stable'
;
if
(
strpos
(
$file
->
version
,
'a'
)
!==
false
)
{
$stability
=
'alpha'
;
}
elseif
(
strpos
(
$file
->
version
,
'b'
)
!==
false
)
{
$stability
=
'beta'
;
}
$file
->
stability
=
$stability
;
$files
[
$file
->
name
]
=
$file
;
}
krsort
(
$files
,
SORT_NATURAL
);
...
...
@@ -80,8 +88,14 @@ function get_dl_link($flavor, $version, $file = null)
// Fetch the clean list of binary files.
$files
=
get_binary_files
();
// Get the latest version number, fallback to 1.1.10.
$stable
=
reset
(
$files
)
->
version
??
'1.1.10'
;
// Get the latest stable version number, fallback to 1.1.10.
$stable
=
'1.1.10'
;
foreach
(
$files
as
$file
)
{
if
(
$file
->
stability
===
'stable'
)
{
$stable
=
$file
->
version
;
break
;
}
}
// Save binary details of latest stable version to "binaries.json".
save_binaries_json
(
$files
,
$stable
);
...
...
@@ -187,8 +201,8 @@ save_binaries_json($files, $stable);
Yes, but please use
<a
href=
"/binaries.json"
>
this JSON representation
</a>
in stead of this website. Also, please note that excessive polling might get you banned.
</div>
<?php
if
(
$files
)
:
?>
<h2>
Archive
</h2>
<a
href=
"?show-unstable"
>
(show unstable builds)
</a>
<div
id=
"view"
class=
"view-details view-size-20"
>
<ul
id=
"items"
class=
"clearfix"
>
<li
class=
"header"
>
...
...
@@ -196,18 +210,22 @@ save_binaries_json($files, $stable);
<a
class=
"date descending"
><span
class=
"l10n-lastModified"
>
Changed
</span></a>
<a
class=
"size"
><span
class=
"l10n-size"
>
Size
</span></a>
</li>
<?php
foreach
(
$files
as
$f
)
:
?>
<li
class=
"item file"
>
<a
href=
"
<?php
echo
get_dl_link
(
null
,
null
,
$f
->
name
);
?>
"
>
<span
class=
"label"
title=
"
<?php
echo
$f
->
name
?>
"
>
<?php
echo
$f
->
name
?>
</span>
<span
class=
"date"
data-time=
"
<?php
echo
$f
->
created
?>
"
>
<?php
echo
$f
->
created
?>
</span>
<span
class=
"size"
data-bytes=
"
<?php
echo
$f
->
size
?>
"
>
<?php
echo
human_filesize
(
$f
->
size
);
?>
</span>
<?php
foreach
(
$files
as
$file
)
:
?>
<?php
if
(
$file
->
stability
!==
'stable'
&&
!
isset
(
$_GET
[
'show-unstable'
]))
{
continue
;
}
?>
<li
class=
"item file stability-
<?php
echo
$file
->
stability
;
?>
"
>
<a
href=
"
<?php
echo
get_dl_link
(
null
,
null
,
$file
->
name
);
?>
"
>
<span
class=
"label"
title=
"
<?php
echo
$file
->
name
;
?>
"
>
<?php
echo
$file
->
name
;
?>
</span>
<span
class=
"date"
data-time=
"
<?php
echo
$file
->
created
;
?>
"
>
<?php
echo
$file
->
created
;
?>
</span>
<span
class=
"size"
data-bytes=
"
<?php
echo
$file
->
size
;
?>
"
>
<?php
echo
human_filesize
(
$file
->
size
);
?>
</span>
</a>
</li>
<?php
endforeach
;
?>
</ul>
</div>
<?php
endif
;
?>
</div>
</body>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment