complete refactor of scripts now includes upgrade script
parent
501e942ab9
commit
b5a902ef93
BIN
bin/gitea.amd64
BIN
bin/gitea.amd64
Binary file not shown.
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
sudo cp -f /opt/gitea/bin/gitea@.service /etc/systemd/system
|
||||
cat /etc/systemd/system/gitea@.service
|
|
@ -1,2 +0,0 @@
|
|||
# TODO needs to go out and get latest binary from gitea and place in appropirate directory
|
||||
# see my hugo script
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1 @@
|
|||
export GITEA_DATA_DIR=/mnt/data/git-server
|
|
@ -0,0 +1,116 @@
|
|||
@import "/css/theme-arc-green.css";
|
||||
|
||||
* {
|
||||
scrollbar-width: auto;
|
||||
scrollbar-color: #575d6c rgb(64, 69, 82);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 12px!important;
|
||||
height: 10px!important;
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 0px !important;
|
||||
background: #575d6c !important;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: rgb(64, 69, 82) !important;
|
||||
}
|
||||
|
||||
.ui.bar {
|
||||
background-image: linear-gradient(-90deg,#9f2e45,#5d3067) !important;
|
||||
}
|
||||
|
||||
#navbar > .item,
|
||||
#navbar > .right.menu > .item {
|
||||
color: white;
|
||||
}
|
||||
|
||||
#navbar > .item.active,
|
||||
#navbar > .right.menu > .item.active {
|
||||
background: rgba(34, 34, 34, 0.28);
|
||||
}
|
||||
|
||||
#navbar-expand-toggle {
|
||||
color: white !important;
|
||||
background: #383c4a !important;
|
||||
}
|
||||
|
||||
#navbar-expand-toggle {
|
||||
color: white !important;
|
||||
background: #383c4a !important;
|
||||
}
|
||||
|
||||
#navbar-expand-toggle:hover {
|
||||
background: inherit !important;
|
||||
}
|
||||
|
||||
.home .hero .octicon {
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
.ui.breadcrumb a,
|
||||
a:not(.ui),
|
||||
.ui.card > .extra a:not(.ui),
|
||||
a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.ui.breadcrumb a:hover,
|
||||
a:not(.ui):hover,
|
||||
.ui.card > .extra a:not(.ui):hover,
|
||||
a:hover {
|
||||
color: lightgray;
|
||||
}
|
||||
|
||||
/* Star and watch number */
|
||||
.ui.labeled.button:not([class*="left labeled"]) > .label,
|
||||
.ui[class*="left labeled"].button > .button {
|
||||
color: #9b9b9b;
|
||||
}
|
||||
|
||||
.ui.blue.button,
|
||||
.ui.blue.buttons .button,
|
||||
.ui.green.button,
|
||||
.ui.green.buttons .button {
|
||||
background-color: #4e5260;
|
||||
}
|
||||
|
||||
.ui.blue.button:hover,
|
||||
.ui.blue.buttons .button:hover,
|
||||
.ui.green.button:hover,
|
||||
.ui.green.buttons .button:hover,
|
||||
.ui.blue.button:focus,
|
||||
.ui.blue.buttons .button:focus,
|
||||
.ui.green.button:focus,
|
||||
.ui.green.buttons .button:focus {
|
||||
background-color: #60636f;
|
||||
}
|
||||
|
||||
#repo-desc a,
|
||||
.file-view a {
|
||||
color: #4bf;
|
||||
}
|
||||
|
||||
#repo-desc a,
|
||||
.file-view a:hover {
|
||||
color: #00a3e2;
|
||||
}
|
||||
|
||||
.captcha-img {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.ui.pagination.menu .active.item {
|
||||
background-color: #4e5260;
|
||||
}
|
||||
|
||||
/* not enough contrast on wiki pages */
|
||||
.ui.list > .item > .content, .ui.segment {
|
||||
color: #e3e3e3 !important;
|
||||
}
|
||||
|
||||
.breadcrumb .divider, .ui.header {
|
||||
color: #e3e3e3 !important;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
.ui.bar {
|
||||
background-image: linear-gradient(-90deg,#9f2e45,#5d3067) !important;
|
||||
}
|
||||
|
||||
#navbar > .item,
|
||||
#navbar > .right.menu > .item {
|
||||
color: white;
|
||||
}
|
||||
|
||||
#navbar > .item.active,
|
||||
#navbar > .right.menu > .item.active {
|
||||
background: rgba(34, 34, 34, 0.28);
|
||||
}
|
||||
|
||||
#navbar-expand-toggle {
|
||||
color: white !important;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,177 @@
|
|||
body {
|
||||
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol" !important;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
color: #24292e;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0366d6;
|
||||
}
|
||||
|
||||
.following.bar.light {
|
||||
background-color: #24292e;
|
||||
color: rgba(255,255,255,0.75);
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.ui.main.menu {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.ui.menu, .markdown:not(code), .ui.button, .ui.header {
|
||||
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
|
||||
}
|
||||
|
||||
.ui.main.menu .item {
|
||||
color: rgba(255,255,255,1);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ui.secondary.main.menu .active.item {
|
||||
color: rgba(255,255,255,1);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ui.secondary.main.menu .active.item:hover {
|
||||
color: rgba(255,255,255,0.75);
|
||||
}
|
||||
|
||||
.ui.secondary.main.menu a.item:hover {
|
||||
color: rgba(255,255,255,0.75);
|
||||
}
|
||||
|
||||
.ui.secondary.main.menu .dropdown.item:hover {
|
||||
color: rgba(255,255,255,0.75);
|
||||
}
|
||||
|
||||
.repository.view.issue .title h1 {
|
||||
font-size: 32px;
|
||||
font-weight: 400;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.ui.green.button {
|
||||
background-color: #28a745;
|
||||
background-image: linear-gradient(-180deg, #34d058 0%, #28a745 90%);
|
||||
}
|
||||
|
||||
.ui.green.button:hover {
|
||||
background-color: #269f42;
|
||||
background-image: linear-gradient(-180deg, #2fcb53 0%, #269f42 90%);
|
||||
}
|
||||
|
||||
.ui.button {
|
||||
border: 1px solid rgba(27,31,35,0.2);
|
||||
border-radius: 0.25em;
|
||||
background-color: #eff3f6;
|
||||
background-image: linear-gradient(-180deg, #fafbfc 0%, #eff3f6 90%);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ui.button:hover {
|
||||
border-color: rgba(27,31,35,0.5);
|
||||
background-color: #e6ebf1;
|
||||
background-image: linear-gradient(-180deg, #f0f3f6 0%, #e6ebf1 90%);
|
||||
}
|
||||
|
||||
.ui.buttons .button:first-child {
|
||||
border-left: 1px solid rgba(27,31,35,0.2);
|
||||
}
|
||||
|
||||
.ui.buttons .button:first-child:hover {
|
||||
border-left-color: rgba(27, 31, 35, 0.5);
|
||||
}
|
||||
|
||||
.ui.blue.button, .ui.tiny.blue.buttons.button, .ui.tiny.blue.buttons a.ui.button {
|
||||
background-color: #2185d0;
|
||||
background-image: linear-gradient(-180deg, #3e98db 0%, #2185d0 90%);
|
||||
}
|
||||
|
||||
.ui.blue.button:hover, .ui.tiny.blue.buttons.button:hover, .ui.tiny.blue.buttons a.ui.button:hover {
|
||||
background-color: #1c6fac;
|
||||
background-image: linear-gradient(-180deg, #2185d0 0%, #1c6fac 90%);
|
||||
}
|
||||
|
||||
.ui.red.button {
|
||||
background-color: #ca1010;
|
||||
background-image: linear-gradient(-180deg, #e72525 0%, #ca1010 90%);
|
||||
}
|
||||
|
||||
.ui.red.button:hover {
|
||||
background-color: #af0e0e;
|
||||
background-image: linear-gradient(-180deg, #ca1010 0%, #af0e0e 90%);
|
||||
}
|
||||
|
||||
.ui.breadcrumb a {
|
||||
color: #0366d6;
|
||||
}
|
||||
|
||||
.repository .header-grid .ui.huge.breadcrumb {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ui.compact.labeled.button, .ui.compact.button a {
|
||||
color: #24292e;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ui.table td.message a {
|
||||
color: #6a737d;
|
||||
}
|
||||
|
||||
.ui.table td.name a:hover, .ui.table td.message a:hover {
|
||||
text-decoration: underline;
|
||||
color: #0366d6;
|
||||
}
|
||||
|
||||
#repo-files-table.ui.fixed.single.line.table thead tr.commit-list {
|
||||
background-color: #f1f8ff;
|
||||
border: 1px solid #c8e1ff;
|
||||
}
|
||||
|
||||
#repo-files-table.ui.fixed.single.line.table thead tr.commit-list th {
|
||||
background-color: #f1f8ff;
|
||||
border-bottom: 1px solid #c8e1ff;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.ui.top.attached.header {
|
||||
background-color: #f6f8fa;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.ui.top.attached.header strong {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ui.tabular.stackable.menu.navbar a.item {
|
||||
color: #586069;
|
||||
}
|
||||
|
||||
.ui.tabular.stackable.menu.navbar a.item:hover {
|
||||
color: #24292e;
|
||||
}
|
||||
|
||||
.ui.tabular.stackable.menu.navbar a.active.item {
|
||||
font-weight: 400;
|
||||
color: #24292e;
|
||||
}
|
||||
|
||||
.repository.file.list #repo-files-table tr:hover {
|
||||
background-color: #f6f8fa;
|
||||
}
|
||||
|
||||
.repository .header-grid .mega-octicon {
|
||||
font-size: 18px;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.ui.label {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
|
@ -0,0 +1,134 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{.Language}}" class="theme-{{.SignedUser.Theme}}">
|
||||
<head data-suburl="{{AppSubUrl}}">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<title>{{if .Title}}{{.Title | RenderEmojiPlain}} - {{end}} {{if .Repository.Name}}{{.Repository.Name}} - {{end}}{{AppName}} </title>
|
||||
<link rel="manifest" href="{{AppSubUrl}}/manifest.json" crossorigin="use-credentials">
|
||||
<meta name="theme-color" content="{{ThemeColorMetaTag}}">
|
||||
<meta name="author" content="{{if .Repository}}{{.Owner.Name}}{{else}}{{MetaAuthor}}{{end}}" />
|
||||
<meta name="description" content="{{if .Repository}}{{.Repository.Name}}{{if .Repository.Description}} - {{.Repository.Description}}{{end}}{{else}}{{MetaDescription}}{{end}}" />
|
||||
<meta name="keywords" content="{{MetaKeywords}}">
|
||||
<meta name="referrer" content="no-referrer" />
|
||||
<meta name="_csrf" content="{{.CsrfToken}}" />
|
||||
{{if .IsSigned}}
|
||||
<meta name="_uid" content="{{.SignedUser.ID}}" />
|
||||
{{end}}
|
||||
{{if .ContextUser}}
|
||||
<meta name="_context_uid" content="{{.ContextUser.ID}}" />
|
||||
{{end}}
|
||||
{{if .SearchLimit}}
|
||||
<meta name="_search_limit" content="{{.SearchLimit}}" />
|
||||
{{end}}
|
||||
{{if .GoGetImport}}
|
||||
<meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">
|
||||
<meta name="go-source" content="{{.GoGetImport}} _ {{.GoDocDirectory}} {{.GoDocFile}}">
|
||||
{{end}}
|
||||
<script>
|
||||
window.config = {
|
||||
AppVer: '{{AppVer}}',
|
||||
AppSubUrl: '{{AppSubUrl}}',
|
||||
StaticUrlPrefix: '{{StaticUrlPrefix}}',
|
||||
UseServiceWorker: {{UseServiceWorker}},
|
||||
csrf: '{{.CsrfToken}}',
|
||||
HighlightJS: {{if .RequireHighlightJS}}true{{else}}false{{end}},
|
||||
SimpleMDE: {{if .RequireSimpleMDE}}true{{else}}false{{end}},
|
||||
Tribute: {{if .RequireTribute}}true{{else}}false{{end}},
|
||||
U2F: {{if .RequireU2F}}true{{else}}false{{end}},
|
||||
Heatmap: {{if .EnableHeatmap}}true{{else}}false{{end}},
|
||||
heatmapUser: {{if .HeatmapUser}}'{{.HeatmapUser}}'{{else}}null{{end}},
|
||||
NotificationSettings: {
|
||||
MinTimeout: {{NotificationSettings.MinTimeout}},
|
||||
TimeoutStep: {{NotificationSettings.TimeoutStep}},
|
||||
MaxTimeout: {{NotificationSettings.MaxTimeout}},
|
||||
EventSourceUpdateTime: {{NotificationSettings.EventSourceUpdateTime}},
|
||||
},
|
||||
{{if .RequireTribute}}
|
||||
tributeValues: Array.from(new Map([
|
||||
{{ range .Participants }}
|
||||
['{{.Name}}', {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}',
|
||||
name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.RelAvatarLink}}'}],
|
||||
{{ end }}
|
||||
{{ range .Assignees }}
|
||||
['{{.Name}}', {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}',
|
||||
name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.RelAvatarLink}}'}],
|
||||
{{ end }}
|
||||
]).values()),
|
||||
{{end}}
|
||||
};
|
||||
</script>
|
||||
<link rel="icon" href="{{StaticUrlPrefix}}/img/favicon.svg" type="image/svg+xml">
|
||||
<link rel="alternate icon" href="{{StaticUrlPrefix}}/img/favicon.png" type="image/png">
|
||||
<link rel="mask-icon" href="{{StaticUrlPrefix}}/img/gitea-safari.svg" color="#609926">
|
||||
<link rel="fluid-icon" href="{{StaticUrlPrefix}}/img/gitea-lg.png" title="{{AppName}}">
|
||||
{{if .RequireSimpleMDE}}
|
||||
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/simplemde/simplemde.min.css">
|
||||
{{end}}
|
||||
<link rel="stylesheet" href="{{StaticUrlPrefix}}/css/index.css?v={{MD5 AppVer}}">
|
||||
<noscript>
|
||||
<style>
|
||||
.dropdown:hover > .menu { display: block; }
|
||||
.ui.secondary.menu .dropdown.item > .menu { margin-top: 0; }
|
||||
</style>
|
||||
</noscript>
|
||||
<style class="list-search-style"></style>
|
||||
{{if .PageIsUserProfile}}
|
||||
<meta property="og:title" content="{{.Owner.Name}}" />
|
||||
<meta property="og:type" content="profile" />
|
||||
<meta property="og:image" content="{{.Owner.AvatarLink}}" />
|
||||
<meta property="og:url" content="{{.Owner.HTMLURL}}" />
|
||||
{{if .Owner.Description}}
|
||||
<meta property="og:description" content="{{.Owner.Description}}">
|
||||
{{end}}
|
||||
{{else if .Repository}}
|
||||
{{if .Issue}}
|
||||
<meta property="og:title" content="{{.Issue.Title}}" />
|
||||
<meta property="og:url" content="{{.Issue.HTMLURL}}" />
|
||||
{{if .Issue.Content}}
|
||||
<meta property="og:description" content="{{.Issue.Content}}" />
|
||||
{{end}}
|
||||
{{else}}
|
||||
<meta property="og:title" content="{{.Repository.Name}}" />
|
||||
<meta property="og:url" content="{{.Repository.HTMLURL}}" />
|
||||
{{if .Repository.Description}}
|
||||
<meta property="og:description" content="{{.Repository.Description}}" />
|
||||
{{end}}
|
||||
{{end}}
|
||||
<meta property="og:type" content="object" />
|
||||
<meta property="og:image" content="{{.Repository.Owner.AvatarLink}}" />
|
||||
{{else}}
|
||||
<meta property="og:title" content="{{AppName}}">
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:image" content="{{StaticUrlPrefix}}/img/gitea-lg.png" />
|
||||
<meta property="og:url" content="{{AppUrl}}" />
|
||||
<meta property="og:description" content="{{MetaDescription}}">
|
||||
{{end}}
|
||||
<meta property="og:site_name" content="{{AppName}}" />
|
||||
{{if .IsSigned }}
|
||||
{{ if ne .SignedUser.Theme "gitea" }}
|
||||
<link rel="stylesheet" href="{{StaticUrlPrefix}}/css/theme-{{.SignedUser.Theme}}.css?v={{MD5 AppVer}}">
|
||||
{{end}}
|
||||
{{else if ne DefaultTheme "gitea"}}
|
||||
<link rel="stylesheet" href="{{StaticUrlPrefix}}/css/theme-{{DefaultTheme}}.css?v={{MD5 AppVer}}">
|
||||
{{end}}
|
||||
{{template "custom/header" .}}
|
||||
</head>
|
||||
<body>
|
||||
{{template "custom/body_outer_pre" .}}
|
||||
|
||||
<div class="full height">
|
||||
<noscript>{{.i18n.Tr "enable_javascript"}}</noscript>
|
||||
|
||||
{{template "custom/body_inner_pre" .}}
|
||||
|
||||
{{if not .PageIsInstall}}
|
||||
<div class="ui top secondary stackable main menu following bar light">
|
||||
{{template "base/head_navbar" .}}
|
||||
</div><!-- end bar -->
|
||||
{{end}}
|
||||
{{/*
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
*/}}
|
|
@ -0,0 +1,163 @@
|
|||
<div class="ui container" id="navbar">
|
||||
<div class="item brand" style="justify-content: space-between;">
|
||||
<div>KEBLER.NET - Trantor</div>
|
||||
<!-- <a href="{{AppSubUrl}}/">
|
||||
<img class="ui mini image" src="{{StaticUrlPrefix}}/img/gitea-sm.png">
|
||||
</a> -->
|
||||
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
|
||||
<i class="sidebar icon"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{if and .IsSigned .MustChangePassword}}
|
||||
{{/* No links */}}
|
||||
{{else if .IsSigned}}
|
||||
<a class="item {{if .PageIsDashboard}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a>
|
||||
{{if not .UnitIssuesGlobalDisabled}}
|
||||
<a class="item {{if .PageIsIssues}}active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
|
||||
{{end}}
|
||||
{{if not .UnitPullsGlobalDisabled}}
|
||||
<a class="item {{if .PageIsPulls}}active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
|
||||
{{end}}
|
||||
{{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}}
|
||||
{{if .ShowMilestonesDashboardPage}}<a class="item {{if .PageIsMilestonesDashboard}}active{{end}}" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a>{{end}}
|
||||
{{end}}
|
||||
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
|
||||
{{else if .IsLandingPageHome}}
|
||||
<a class="item {{if .PageIsHome}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
|
||||
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
|
||||
{{else if .IsLandingPageExplore}}
|
||||
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "home"}}</a>
|
||||
{{else if .IsLandingPageOrganizations}}
|
||||
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.i18n.Tr "home"}}</a>
|
||||
{{end}}
|
||||
|
||||
{{template "custom/extra_links" .}}
|
||||
|
||||
{{/*
|
||||
<div class="item">
|
||||
<div class="ui icon input">
|
||||
<input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
|
||||
<i class="search icon"></i>
|
||||
</div>
|
||||
</div>
|
||||
*/}}
|
||||
|
||||
|
||||
{{if and .IsSigned .MustChangePassword}}
|
||||
<div class="right stackable menu">
|
||||
<div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
|
||||
<span class="text">
|
||||
<img class="ui tiny avatar image" width="24" height="24" src="{{.SignedUser.RelAvatarLink}}">
|
||||
<span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
|
||||
<span class="mobile-only">{{.SignedUser.Name}}</span>
|
||||
<span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down" 16}}</span>
|
||||
</span>
|
||||
<div class="menu user-menu" tabindex="-1">
|
||||
<div class="ui header">
|
||||
{{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
||||
</div>
|
||||
|
||||
<div class="divider"></div>
|
||||
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
|
||||
{{svg "octicon-sign-out" 16}}
|
||||
{{.i18n.Tr "sign_out"}}<!-- Sign Out -->
|
||||
</a>
|
||||
</div><!-- end content avatar menu -->
|
||||
</div><!-- end dropdown avatar menu -->
|
||||
</div>
|
||||
{{else if .IsSigned}}
|
||||
<div class="right stackable menu">
|
||||
<a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
|
||||
<span class="text">
|
||||
<span class="fitted">{{svg "octicon-bell" 16}}</span>
|
||||
<span class="sr-mobile-only">{{.i18n.Tr "notifications"}}</span>
|
||||
{{$notificationUnreadCount := 0}}
|
||||
{{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}}
|
||||
<span class="ui red label {{if not $notificationUnreadCount}}hidden{{end}} notification_count">
|
||||
{{$notificationUnreadCount}}
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<div class="ui dropdown jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
|
||||
<span class="text">
|
||||
<span class="fitted">{{svg "octicon-plus" 16}}</span>
|
||||
<span class="sr-mobile-only">{{.i18n.Tr "create_new"}}</span>
|
||||
<span class="fitted not-mobile">{{svg "octicon-triangle-down" 16}}</span>
|
||||
</span>
|
||||
<div class="menu">
|
||||
<a class="item" href="{{AppSubUrl}}/repo/create">
|
||||
<span class="fitted">{{svg "octicon-plus" 16}}</span> {{.i18n.Tr "new_repo"}}
|
||||
</a>
|
||||
<a class="item" href="{{AppSubUrl}}/repo/migrate">
|
||||
<span class="fitted">{{svg "octicon-repo-push" 16}}</span> {{.i18n.Tr "new_migrate"}}
|
||||
</a>
|
||||
{{if .SignedUser.CanCreateOrganization}}
|
||||
<a class="item" href="{{AppSubUrl}}/org/create">
|
||||
<span class="fitted">{{svg "octicon-organization" 16}}</span> {{.i18n.Tr "new_org"}}
|
||||
</a>
|
||||
{{end}}
|
||||
</div><!-- end content create new menu -->
|
||||
</div><!-- end dropdown menu create new -->
|
||||
|
||||
<div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
|
||||
<span class="text">
|
||||
<img class="ui tiny avatar image" width="24" height="24" src="{{.SignedUser.RelAvatarLink}}">
|
||||
<span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
|
||||
<span class="mobile-only">{{.SignedUser.Name}}</span>
|
||||
<span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down" 16}}</span>
|
||||
</span>
|
||||
<div class="menu user-menu" tabindex="-1">
|
||||
<div class="ui header">
|
||||
{{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
||||
</div>
|
||||
|
||||
<div class="divider"></div>
|
||||
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}">
|
||||
{{svg "octicon-person" 16}}
|
||||
{{.i18n.Tr "your_profile"}}<!-- Your profile -->
|
||||
</a>
|
||||
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}?tab=stars">
|
||||
{{svg "octicon-star" 16}}
|
||||
{{.i18n.Tr "your_starred"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
|
||||
{{svg "octicon-tools" 16}}
|
||||
{{.i18n.Tr "your_settings"}}<!-- Your settings -->
|
||||
</a>
|
||||
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">
|
||||
{{svg "octicon-question" 16}}
|
||||
{{.i18n.Tr "help"}}<!-- Help -->
|
||||
</a>
|
||||
{{if .IsAdmin}}
|
||||
<div class="divider"></div>
|
||||
|
||||
<a class="{{if .PageIsAdmin}}active{{end}} item" href="{{AppSubUrl}}/admin">
|
||||
<i class="icon settings"></i>
|
||||
{{.i18n.Tr "admin_panel"}}<!-- Admin Panel -->
|
||||
</a>
|
||||
{{end}}
|
||||
|
||||
<div class="divider"></div>
|
||||
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
|
||||
{{svg "octicon-sign-out" 16}}
|
||||
{{.i18n.Tr "sign_out"}}<!-- Sign Out -->
|
||||
</a>
|
||||
</div><!-- end content avatar menu -->
|
||||
</div><!-- end dropdown avatar menu -->
|
||||
</div><!-- end signed user right menu -->
|
||||
{{else}}
|
||||
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.i18n.Tr "help"}}</a>
|
||||
<div class="right stackable menu">
|
||||
{{if .ShowRegistrationButton}}
|
||||
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
|
||||
{{svg "octicon-person" 16}} {{.i18n.Tr "register"}}
|
||||
</a>
|
||||
{{end}}
|
||||
<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login?redirect_to={{.CurrentURL}}">
|
||||
{{svg "octicon-sign-in" 16}} {{.i18n.Tr "sign_in"}}
|
||||
</a>
|
||||
</div><!-- end anonymous right menu -->
|
||||
{{end}}
|
||||
</div>
|
|
@ -0,0 +1 @@
|
|||
<div></div>
|
|
@ -0,0 +1 @@
|
|||
<div><h1>McCarty Git Server<h1></div>
|
|
@ -0,0 +1,2 @@
|
|||
<link rel="icon" type="image/png" sizes="32x32" href="/img/icon/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/img/icon/favicon-16x16.png">
|
|
@ -0,0 +1,16 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="home">
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="sixteen wide center aligned centered column">
|
||||
<div>
|
||||
<!-- <img class="logo" src="{{StaticUrlPrefix}}/img/gitea-lg.png" /> -->
|
||||
</div>
|
||||
<div class="hero">
|
||||
<h1 class="ui icon header title">
|
||||
{{AppName}}
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
|
@ -0,0 +1,3 @@
|
|||
<div class="sixteen wide center aligned centered column">
|
||||
<H1>MIRROR KEBLER.NET GIT SERVER</H1>
|
||||
</div>
|
|
@ -32,10 +32,10 @@ restart gitea `sds gitea@<instance>`
|
|||
Use run script
|
||||
|
||||
run in foreground
|
||||
`./run <ini> <arch>`
|
||||
`./run <ini>`
|
||||
|
||||
for running in background
|
||||
`./start <ini> <arch>`
|
||||
`./start <ini>`
|
||||
`./stop`
|
||||
|
||||
for working with custom files
|
||||
|
|
30
run
30
run
|
@ -1,30 +0,0 @@
|
|||
#!/bin/bash
|
||||
DEPLOY=${1:-default}
|
||||
declare -A ARCHES
|
||||
ARCHES=(["x86_64"]="amd64" ["arm32"]="arm32" ["armhf"]="arm32" ["arm64"]="arm64" ["aarch64"]="arm64" )
|
||||
ARCH=$(arch)
|
||||
if [ -z "${ARCHES[$ARCH]}" ]; then
|
||||
echo Your machine kernel architecture $ARCH is not supported by this script, aborting
|
||||
exit 1
|
||||
fi
|
||||
DIR=$(dirname "$(readlink -f "$0")") || exit
|
||||
ARCH=$(arch)
|
||||
# echo $ARCH ${ARCHES[$ARCH]}
|
||||
BIN="$DIR/bin/gitea.${ARCHES[$ARCH]}"
|
||||
# echo $ARCH ${ARCHES[$ARCH]} $BIN
|
||||
if [ ! -f $BIN ]; then
|
||||
echo $ARCH/${ARCHES[$ARCH]} gitea binary is not available in $BIN, run ./bin/update script
|
||||
exit 1
|
||||
fi
|
||||
INI="$DIR/config/$DEPLOY.ini"
|
||||
mkdir -p $DIR/frontend/current
|
||||
rsync -a --delete $DIR/frontend/default/ $DIR/frontend/current
|
||||
rsync -a $DIR/frontend/$DEPLOY/ $DIR/frontend/current
|
||||
export GITEA_WORK_DIR=/mnt/data/git-server
|
||||
export GITEA_CUSTOM=$DIR/frontend/current
|
||||
export USER=sysadmin
|
||||
export HOME=/home/sysadmin
|
||||
# where data and repo are located
|
||||
# export -p | grep GITEA
|
||||
echo Running: $BIN web -c $INI
|
||||
$BIN web -c $INI
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
SDIR=$(dirname "$(readlink -f "$0")") || exit
|
||||
DIR=$(dirname "$SDIR") || exit
|
||||
echo Caddy Reposity Root: $DIR
|
||||
source $SDIR/library
|
||||
CONF=$DIR/conf/${1:-caddy}.conf
|
||||
CMD=${2:-run}
|
||||
get-caddy-bin # this sets $CADDY_BIN
|
||||
BIN=$DIR/bin/$CADDY_BIN
|
||||
[ ! -f "$BIN" ] && echo binary file $BIN does not exist && exit 1
|
||||
[ ! -x "$BIN" ] && echo binary file $BIN is not executable && exit 1
|
||||
[ ! -f "$CONF" ] && echo no configuration file $CONF && exit 1
|
||||
# source any need environment files in $DIR/env
|
||||
for f in $DIR/env/*.env; do source $f; done
|
||||
echo Running caddy binary $BIN with configuration $CONF and command $CMD as user $USER
|
||||
$BIN $CMD --config $CONF --adapter caddyfile
|
|
@ -30,8 +30,9 @@ RestartSec=2s
|
|||
Type=simple
|
||||
User=sysadmin
|
||||
Group=sysadmin
|
||||
Environment=GITEA_DIR=/opt/gitea
|
||||
ExecStart=/bin/bash -c '${GITEA_DIR}/run %i'
|
||||
Environment=GITEA_DIR=@d
|
||||
Environment=GITEA_REPOS=@r
|
||||
ExecStart=/bin/bash -c '${GITEA_DIR}/scripts/run -r ${GITEA_REPOS} %i '
|
||||
Restart=always
|
||||
# If you want to bind Gitea to a port below 1024 uncomment
|
||||
# the two values below
|
|
@ -0,0 +1,38 @@
|
|||
#!/bin/bash
|
||||
[[ ! $GITEA_DIR ]] && export GITEA_DIR="$(dirname "$(cd "$(dirname "$BASH_SOURCE")"; pwd -P)")"
|
||||
|
||||
function version () {
|
||||
# https://askubuntu.com/a/952479/478337
|
||||
[[ ! -f $GITEA_DIR/gitea.bin ]] && echo "" && return 2
|
||||
CUR_VER=$($GITEA_DIR/gitea.bin -version | sed -nr 's:.*version ([^ ]+).*:\1:p')
|
||||
[ ! $CUR_VER ] && return 1
|
||||
echo $CUR_VER
|
||||
}
|
||||
|
||||
# sets global $OS
|
||||
function get_OS () {
|
||||
case "$OSTYPE" in
|
||||
# uncomment valid OS
|
||||
darwin*) OS=darwin ;;
|
||||
linux*) OS=linux ;;
|
||||
# msys*) OS=windows ;;
|
||||
*) ;;
|
||||
esac
|
||||
[ ! $OS ] && return 1
|
||||
echo $OS
|
||||
}
|
||||
|
||||
# sets global $ARCH
|
||||
function get_arch () {
|
||||
declare -A ARCHES
|
||||
#ARCHES=( ["arm64"]="arm64" ["aarch64"]="arm64" ["x86_64"]="amd64" ["armv61"]="armv6" ["armv71"]="armv7" ["arm32"]="armv7" ["armhf"]="armv7" )
|
||||
# set valid architectures
|
||||
ARCHES=( ["arm64"]="arm64" ["aarch64"]="arm64" ["x86_64"]="amd64" )
|
||||
ARCH=${ARCHES[$(uname -m)]}
|
||||
[ ! $ARCH ] && return 1
|
||||
echo $ARCH
|
||||
}
|
||||
|
||||
function set-env () {
|
||||
for f in $1/*.env; do source $f; done
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
#!/bin/bash
|
||||
[[ ! $GITEA_DIR ]] && export GITEA_DIR="$(dirname "$(cd "$(readlink -f "$BASH_SOURCE")"; pwd -P)")"
|
||||
source $GITEA_DIR/scripts/library
|
||||
|
||||
declare OPTARG
|
||||
declare OPTION
|
||||
while getopts 'r:' OPTION; do
|
||||
case "$OPTION" in
|
||||
r)
|
||||
GITEA_DATA_DIR=$OPTARG
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
done
|
||||
shift $(( OPTIND - 1 ))
|
||||
|
||||
export GITEA_INSTANCE=${1:-default}
|
||||
export GITEA_BIN="$GITEA_DIR/gitea.bin"
|
||||
[[ ! -f $GITEA_BIN ]] && $GITEA_DIR/scripts/upgrade
|
||||
[[ ! $(version) ]] && echo $GITEA_DIR/gitea.bin missing or corrupt
|
||||
if [[ ! $GITEA_DATA_DIR ]]; then
|
||||
GITEA_DATA_DIR=$GITEA_DIR/data
|
||||
else
|
||||
[[ ! $GITEA_DATA_DIR == /* ]] && { echo "repo directory $GITEA_DATA_DIR was not absolute, aborting" ; exit; }
|
||||
fi
|
||||
export GITEA_DATA_DIR
|
||||
INI=$GITEA_DIR/config/$GITEA_INSTANCE
|
||||
if ([[ -f "$INI.tmpl" ]] && [[ ! -f $GITEA_DATA_DIR/db/git.db ]]); then
|
||||
# if database does not exist unlock the install page so default user can be set # && LOCK=true
|
||||
# https://stackoverflow.com/a/22819516/4695378
|
||||
# search and replace data subdirectory entries in template file
|
||||
cat $INI.tmpl | sed 's:@@_server_dir:'$GITEA_DATA_DIR':'g | sed 's:\(INSTALL_LOCK *= \)\(.*\):\1'${LOCK:-false}':' > $INI.ini
|
||||
# TODO could replace other values as well
|
||||
fi
|
||||
[[ ! -f "$INI.ini" ]] && { echo "no ini file $INI.ini, aborting" ; exit; }
|
||||
# echo $GITEA_DATA_DIR
|
||||
# echo $GITEA_DIR
|
||||
# echo $ARCH ${ARCHES[$ARCH]} $GITEA_BIN
|
||||
mkdir -p $GITEA_DATA_DIR 2>/dev/null || { echo "unable to make repos directory at $GITEA_DATA_DIR, exiting"; exit; }
|
||||
# setup the custom directory in /current
|
||||
mkdir -p $GITEA_DIR/frontend/current
|
||||
rsync -a --delete $GITEA_DIR/frontend/default/ $GITEA_DIR/frontend/current
|
||||
[[ -d $GITEA_DIR/frontend/$GITEA_INSTANCE ]] && rsync -a $GITEA_DIR/frontend/$GITEA_INSTANCE/ $GITEA_DIR/frontend/current
|
||||
export GITEA_WORK_DIR=$GITEA_DATA_DIR
|
||||
export GITEA_CUSTOM=$GITEA_DIR/frontend/current
|
||||
export USER=sysadmin
|
||||
export HOME=/home/sysadmin
|
||||
echo Running: $GITEA_BIN web -c $INI.ini
|
||||
echo Server repos/logs/data/db will be $GITEA_DATA_DIR
|
||||
$GITEA_BIN web -c $INI.ini
|
|
@ -1,7 +1,6 @@
|
|||
#!/bin/bash
|
||||
DIR=$(dirname "$(readlink -f "$0")") || exit
|
||||
COMMAND="$DIR/run $1"
|
||||
|
||||
DIR="$(dirname "$(cd "$(dirname "$(readlink -f "$0")")";pwd -P)")"|| exit
|
||||
COMMAND=$DIR/scripts/run "$@"
|
||||
echo $DIR $COMMAND
|
||||
|
||||
PIDFILE="$DIR/gitea.pid"
|
|
@ -0,0 +1,65 @@
|
|||
#!/bin/bash
|
||||
# dependencies, jq
|
||||
# if you have run into github api anonymous access limits which happens during debugging/dev then add user and token here or sourced from a separate file
|
||||
# . ~/githubapitoken
|
||||
#GITHUB_USER=""
|
||||
#GITHUB_TOKEN=""
|
||||
|
||||
[[ $(command -v jq &> /dev/null) ]] && echo jq is required, install via \'sudo apt install jq\' && exit
|
||||
|
||||
[[ ! $GITEA_DIR ]] && export GITEA_DIR="$(dirname "$(cd "$(dirname "$BASH_SOURCE")"; pwd -P)")"
|
||||
source $GITEA_DIR/scripts/library
|
||||
|
||||
REPO=go-gitea/gitea
|
||||
|
||||
if [ "$GITHUB_TOKEN" != "" ]; then
|
||||
echo using access token with script
|
||||
echo $GITHUB_USER $GITHUB_TOKEN
|
||||
fi
|
||||
|
||||
# ARCHIVE=tar.gz
|
||||
# [ "$OS" == "windows" ] && ARCHIVE=zip
|
||||
OS=$(get_OS)
|
||||
ARCH=$(get_arch)
|
||||
[[ ! $OS ]] && echo non supported OS $OS && exit
|
||||
[[ ! $ARCH ]] && echo non supported architecture $ARCH && exit
|
||||
echo Gitea Upgrade/Install for
|
||||
echo Operating System $OS
|
||||
echo Architecture $ARCH
|
||||
RECORD=$(curl -u $GITHUB_USER:$GITHUB_TOKEN -s https://api.github.com/repos/$REPO/releases/latest)
|
||||
NEW_VER=$(echo $RECORD | jq -r '.tag_name')
|
||||
[ "$NEW_VER" ] && echo $NEW_VER is latest version available from https://github.com/c$REPO/releases
|
||||
echo checking current gitea installed version
|
||||
VER=$(version)
|
||||
if [[ "$NEW_VER" == "v$VER" ]]; then
|
||||
echo gitea is up to date, nothing to upgrade, v$VER
|
||||
exit
|
||||
else
|
||||
[[ $VER ]] && echo updating v$VER to $NEW_VER || echo no current installed gitea binary, installing $NEW_VER
|
||||
fi
|
||||
|
||||
URL=$(echo $RECORD | \
|
||||
jq -r \
|
||||
--arg os $OS \
|
||||
--arg arch $ARCH \
|
||||
--arg archnot "$ARCH." \
|
||||
'.assets[] | select( .name | contains($os)) |
|
||||
select (.name | contains($arch)) |
|
||||
select (.name | contains($archnot) | not )
|
||||
.browser_download_url' \
|
||||
)
|
||||
|
||||
echo $URL
|
||||
|
||||
if [ $URL ]; then
|
||||
echo "Downloading Gitea Binary at $URL"
|
||||
wget --user=-u $GITHUB_USER --password=$GITHUB_TOKEN -q -O $GITEA_DIR/gitea.bin $URL
|
||||
if ( [[ $? -eq 0 ]] && [[ "$NEW_VER" == *"$(version)"* ]] ); then
|
||||
chmod +x $GITEA_DIR/gitea.bin
|
||||
echo upgrade succeeded, $GITEA_DIR/gitea.bin version is $(version)
|
||||
else
|
||||
echo upgrade from $URL failed
|
||||
fi
|
||||
else
|
||||
echo unabled to determine download url
|
||||
fi
|
|
@ -1,12 +1,12 @@
|
|||
#!/bin/bash
|
||||
DEBOUNCE=1.0
|
||||
DIR=$(dirname "$(readlink -f "$0")") || exit
|
||||
export WATCH_DIR="$DIR/frontend/"
|
||||
export WATCH_VERBOSE=1
|
||||
COMMAND="$DIR/restart $1 $2"
|
||||
DIR="$(dirname "$(cd "$(dirname "$(readlink -f "$0")")";pwd -P)")" || exit
|
||||
# export WATCH_DIR="$DIR/frontend/"
|
||||
# export WATCH_VERBOSE=1
|
||||
COMMAND=$DIR/scripts/restart "$@"
|
||||
# LOGFILE="$DIR/watch.log"
|
||||
echo "watching $WATCH_DIR with $COMMAND"
|
||||
inotifywait -mqr -e MODIFY $WATCH_DIR |
|
||||
echo "watching $DIR/frontend/ $DIR/config/$1.ini with $COMMAND"
|
||||
inotifywait -mqr -e MODIFY $DIR/frontend/ $DIR/config/$1.ini |
|
||||
while read ; do
|
||||
# debounce extra events
|
||||
currentTime=$(date +'%H%M%S.%N')
|
Loading…
Reference in New Issue