Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
ffbs-gluon
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
Container registry
Model registry
Operate
Environments
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ffbs
ffbs-gluon
Commits
2c65f083
Unverified
Commit
2c65f083
authored
2 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
gluon-autoupdater: factor out default_branch() function
Make the code clearer and prepare for invalid branch fixup.
parent
db48b6b6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
package/gluon-autoupdater/luasrc/lib/gluon/upgrade/500-autoupdater
+10
-5
10 additions, 5 deletions
...luon-autoupdater/luasrc/lib/gluon/upgrade/500-autoupdater
with
10 additions
and
5 deletions
package/gluon-autoupdater/luasrc/lib/gluon/upgrade/500-autoupdater
+
10
−
5
View file @
2c65f083
...
...
@@ -21,16 +21,21 @@ for name, config in pairs(site.autoupdater.branches()) do
end
end
if
not
uci
:
get
(
'autoupdater'
,
'settings'
)
then
local
enabled
=
unistd
.
access
(
'/lib/gluon/autoupdater/default_enabled'
)
~=
nil
local
branch
=
site
.
autoupdater
.
branch
(
min_branch
)
local
function
default_branch
()
local
f
=
io.open
(
'/lib/gluon/autoupdater/default_branch'
)
if
f
then
branch
=
f
:
read
(
'*line'
)
local
ret
=
f
:
read
(
'*line'
)
f
:
close
()
return
ret
end
return
site
.
autoupdater
.
branch
(
min_branch
)
end
if
not
uci
:
get
(
'autoupdater'
,
'settings'
)
then
local
enabled
=
unistd
.
access
(
'/lib/gluon/autoupdater/default_enabled'
)
~=
nil
local
branch
=
default_branch
()
if
not
branch
then
enabled
=
false
end
...
...
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