Skip to content

Commit 0948dba

Browse files
committed
Merge branch 'master' into issue-4173-alternative-fix
2 parents 81a7a7f + 8e202e2 commit 0948dba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+538
-132
lines changed

.drone.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ pipeline:
5656
event: [ push, tag, pull_request ]
5757

5858
build-without-gcc:
59-
image: golang:1.9
59+
image: golang:1.10 # this step is kept as the lowest version of golang that we support
6060
pull: true
6161
commands:
6262
- go build -o gitea_no_gcc # test if build succeeds without the sqlite tag
6363
when:
6464
event: [ push, tag, pull_request ]
6565

6666
build:
67-
image: golang:1.11
67+
image: golang:1.12
6868
pull: true
6969
environment:
7070
TAGS: bindata sqlite sqlite_unlock_notify
@@ -82,8 +82,8 @@ pipeline:
8282
when:
8383
event: [ push, tag, pull_request ]
8484

85-
test:
86-
image: golang:1.11
85+
unit-test:
86+
image: golang:1.12
8787
pull: true
8888
group: test
8989
environment:
@@ -94,8 +94,8 @@ pipeline:
9494
event: [ push, pull_request ]
9595
branch: [ master ]
9696

97-
test:
98-
image: golang:1.11
97+
release-test:
98+
image: golang:1.12
9999
pull: true
100100
group: test
101101
environment:
@@ -106,8 +106,8 @@ pipeline:
106106
event: [ push, pull_request ]
107107
branch: [ release/* ]
108108

109-
test:
110-
image: golang:1.11
109+
tag-test:
110+
image: golang:1.12
111111
pull: true
112112
group: test
113113
environment:
@@ -118,7 +118,7 @@ pipeline:
118118
event: [ tag ]
119119

120120
test-sqlite:
121-
image: golang:1.11
121+
image: golang:1.12
122122
pull: true
123123
group: test
124124
environment:
@@ -133,7 +133,7 @@ pipeline:
133133
event: [ push, tag, pull_request ]
134134

135135
test-mysql:
136-
image: golang:1.11
136+
image: golang:1.12
137137
pull: true
138138
group: test
139139
environment:
@@ -148,8 +148,8 @@ pipeline:
148148
event: [ push, pull_request ]
149149
branch: [ master ]
150150

151-
test-mysql:
152-
image: golang:1.11
151+
tag-test-mysql:
152+
image: golang:1.12
153153
pull: true
154154
group: test
155155
environment:
@@ -165,7 +165,7 @@ pipeline:
165165
event: [ tag ]
166166

167167
test-pgsql:
168-
image: golang:1.11
168+
image: golang:1.12
169169
pull: true
170170
group: test
171171
environment:
@@ -181,7 +181,7 @@ pipeline:
181181
event: [ push, tag, pull_request ]
182182

183183
test-mssql:
184-
image: golang:1.11
184+
image: golang:1.12
185185
pull: true
186186
group: test
187187
environment:
@@ -196,7 +196,7 @@ pipeline:
196196
event: [ push, tag, pull_request ]
197197

198198
bench-sqlite:
199-
image: golang:1.11
199+
image: golang:1.12
200200
pull: true
201201
group: bench
202202
commands:
@@ -205,7 +205,7 @@ pipeline:
205205
event: [ tag ]
206206

207207
bench-mysql:
208-
image: golang:1.11
208+
image: golang:1.12
209209
pull: true
210210
group: bench
211211
commands:
@@ -214,7 +214,7 @@ pipeline:
214214
event: [ tag ]
215215

216216
bench-mssql:
217-
image: golang:1.11
217+
image: golang:1.12
218218
pull: true
219219
group: bench
220220
commands:
@@ -223,7 +223,7 @@ pipeline:
223223
event: [ tag ]
224224

225225
bench-pgsql:
226-
image: golang:1.11
226+
image: golang:1.12
227227
pull: true
228228
group: bench
229229
commands:
@@ -232,7 +232,7 @@ pipeline:
232232
event: [ tag ]
233233

234234
generate-coverage:
235-
image: golang:1.11
235+
image: golang:1.12
236236
pull: true
237237
environment:
238238
TAGS: bindata
@@ -290,7 +290,7 @@ pipeline:
290290
when:
291291
event: [ pull_request ]
292292

293-
docker:
293+
release-docker:
294294
image: plugins/docker:17.12
295295
pull: true
296296
secrets: [ docker_username, docker_password ]
@@ -323,7 +323,7 @@ pipeline:
323323
when:
324324
event: [ push, tag ]
325325

326-
release:
326+
tag-release:
327327
image: plugins/s3:1
328328
pull: true
329329
secrets: [ aws_access_key_id, aws_secret_access_key ]
@@ -337,7 +337,7 @@ pipeline:
337337
when:
338338
event: [ tag ]
339339

340-
release:
340+
release-branch-release:
341341
image: plugins/s3:1
342342
pull: true
343343
secrets: [ aws_access_key_id, aws_secret_access_key ]

CHANGELOG.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,25 @@ This changelog goes through all the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.io).
66

7+
## [1.7.3](https://github.com/go-gitea/gitea/releases/tag/v1.7.3) - 2019-02-27
8+
* BUGFIXES
9+
* Fix server 500 when trying to migrate to an already existing repository (#6188) (#6197)
10+
* Load Issue attributes for API /repos/{owner}/{repo}/issues/{index} (#6122) (#6185)
11+
* Fix bug whereby user could change private repository to public when force private enabled. (#6156) (#6165)
12+
* Fix bug when update owner team then visit team's repo return 404 (#6119) (#6166)
13+
* Fix heatmap and repository menu display in Internet Explorer 9+ (#6117) (#6137)
14+
* Fix prohibit login check on authorization (#6106) (#6115)
15+
* Fix LDAP protocol error regression by moving to ldap.v3 (#6105) (#6107)
16+
* Fix deadlock in webhook PullRequest (#6102) (#6104)
17+
* Fix redirect loop when password change is required and Gitea is installed as a suburl (#5965) (#6101)
18+
* Fix compare button regression (#5929) (#6098)
19+
* Recover panic in orgmode.Render if bad orgfile (#4982) (#5903) (#6097)
20+
721
## [1.7.2](https://github.com/go-gitea/gitea/releases/tag/v1.7.2) - 2019-02-14
822
* BUGFIXES
923
* Remove all CommitStatus when a repo is deleted (#5940) (#5941)
1024
* Fix notifications on pushing with deploy keys by setting hook environment variables (#5935) (#5944)
11-
* Silence console logger in gitea serv (#5887) (#5943)
25+
* Silence console logger in gitea serv (#5887) (#5943)
1226
* Handle milestone webhook events for issues and PR (#5947) (#5955)
1327
* Show user who created the repository instead of the organization in action feed (#5948) (#5956)
1428
* Fix ssh deploy and user key constraints (#1357) (#5939) (#5966)
@@ -64,7 +78,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
6478
* Give user a link to create PR after push (#4716)
6579
* Add rebase with merge commit merge style (#3844) (#4052)
6680
* BUGFIXES
67-
* Disallow empty titles (#5785) (#5794)
81+
* Disallow empty titles (#5785) (#5794)
6882
* Fix sqlite deadlock when assigning to a PR (#5640) (#5642)
6983
* Don't close issues via commits on non-default branch. (#5622) (#5643)
7084
* Fix commit page showing status for current default branch (#5650) (#5653)

Gopkg.lock

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ generate-stylesheets:
371371
echo "Please install npm version 5.2+"; \
372372
exit 1; \
373373
fi;
374-
$(eval BROWSERS := "> 2%, last 2 firefox versions, last 2 safari versions")
374+
$(eval BROWSERS := "> 1%, last 2 firefox versions, last 2 safari versions, ie 11")
375375
npx lessc --clean-css public/less/index.less public/css/index.css
376376
$(foreach file, $(filter-out public/less/themes/_base.less, $(wildcard public/less/themes/*)),npx lessc --clean-css public/less/themes/$(notdir $(file)) > public/css/theme-$(notdir $(call strip-suffix,$(file))).css;)
377377
$(foreach file, $(wildcard public/css/*),npx postcss --use autoprefixer --autoprefixer.browsers $(BROWSERS) -o $(file) $(file);)

docs/README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
# Gitea: Docs
22

3-
[![Build Status](http://drone.gitea.io/api/badges/go-gitea/docs/status.svg)](http://drone.gitea.io/go-gitea/docs)
4-
[![Join the chat at https://img.shields.io/discord/322538954119184384.svg](https://img.shields.io/discord/322538954119184384.svg)](https://discord.gg/NsatcWJ)
3+
[![Join the chat at https://img.shields.io/discord/322538954119184384.svg](https://img.shields.io/discord/322538954119184384.svg)](https://discord.gg/Gitea)
54
[![](https://images.microbadger.com/badges/image/gitea/docs.svg)](http://microbadger.com/images/gitea/docs "Get your own image badge on microbadger.com")
65

76
## Hosting
87

9-
This page is hosted on our infrastructure within Docker containers, it gets
8+
These pages are hosted using [netlifycms](https://www.netlifycms.org/) and get
109
automatically updated on every push to the `master` branch.
1110

12-
If you want to host this page on your own you can take our docker image
13-
[gitea/docs](https://hub.docker.com/r/gitea/docs/).
14-
1511
## Install
1612

17-
This pages uses the [Hugo](https://github.com/spf13/hugo) static site generator.
13+
These pages use the [Hugo](https://gohugo.io/) static site generator.
1814
If you are planning to contribute you'll want to download and install Hugo on
1915
your local machine.
2016

docs/content/doc/advanced/customizing-gitea.en-us.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Place the png image at the following path: `custom/public/img/avatar\_default.pn
5555
## Customizing Gitea pages
5656

5757
The `custom/templates` folder allows changing every single page of Gitea. Templates
58-
to override can be found in the `templates` directory of Gitea source. Override by
58+
to override can be found in the [`templates`](https://github.com/go-gitea/gitea/tree/master/templates) directory of Gitea source. Override by
5959
making a copy of the file under `custom/templates` using a full path structure
6060
matching source.
6161

@@ -96,6 +96,42 @@ Google Analytics, Matomo (previously Piwik), and other analytics services can be
9696

9797
Place custom files in corresponding sub-folder under `custom/options`.
9898

99+
**NOTE:** The files should not have a file extension, e.g. `Labels` rather than `Labels.txt`
100+
101+
### gitignores
102+
103+
To add custom .gitignore, add a file with existing [.gitignore rules](https://git-scm.com/docs/gitignore) in it to `custom/options/gitignore`
104+
105+
### Labels
106+
107+
To add a custom label set, add a file that follows the [label format](https://github.com/go-gitea/gitea/blob/master/options/label/Default) to `custom/options/label`
108+
`#hex-color label name ; label description`
109+
110+
### Licenses
111+
112+
To add a custom license, add a file with the license text to `custom/options/license`
113+
114+
### Locales
115+
116+
Locales are managed via our [crowdin](https://crowdin.com/project/gitea).
117+
You can override a locale by placing an altered locale file in `custom/options/locale`.
118+
Gitea's default locale files can be found in the [`options/locale`](https://github.com/go-gitea/gitea/tree/master/options/locale) source folder and these should be used as examples for your changes.
119+
120+
To add a completely new locale, as well as placing the file in the above location, you will need to add the new lang and name to the `[i18n]` section in your `app.ini`. Keep in mind that Gitea will use those settings as **overrides**, so if you want to keep the other languages as well you will need to copy/paste the default values and add your own to them.
121+
122+
```
123+
[i18n]
124+
LANGS = en-US,foo-BAR
125+
NAMES = English,FooBar
126+
```
127+
128+
Locales may change between versions, so keeping track of your customized locales is highly encouraged.
129+
130+
### Readmes
131+
132+
To add a custom Readme, add a markdown formatted file (without an `.md` extension) to `custom/options/readme`
133+
99134
## Customizing the look of Gitea
100135

101-
As of version 1.6.0 Gitea has built-in themes. The two built-in themes are, the default theme `gitea`, and a dark theme `arc-green`. To change the look of your Gitea install change the value of `DEFAULT_THEME` in the [ui](https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui) section of `app.ini` to another one of the available options.
136+
As of version 1.6.0 Gitea has built-in themes. The two built-in themes are, the default theme `gitea`, and a dark theme `arc-green`. To change the look of your Gitea install change the value of `DEFAULT_THEME` in the [ui](https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui) section of `app.ini` to another one of the available options.
137+
As of version 1.8.0 Gitea also has per-user themes. The list of themes a user can choose from can be configured with the `THEMES` value in the [ui](https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui) section of `app.ini` (defaults to `gitea` and `arc-green`, light and dark respectively)

docs/content/doc/features/comparison.en-us.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ _Symbols used in table:_
8888
| Issue search ||||||||
8989
| Global issue search ||||||||
9090
| Issue dependency ||||||||
91+
| Create issue via email | [](https://github.com/go-gitea/gitea/issues/6226) | [](https://github.com/gogs/gogs/issues/2602) ||||||
92+
| Service Desk | [](https://github.com/go-gitea/gitea/issues/6219) |||||||
9193

9294
#### Pull/Merge requests
9395

docs/content/doc/installation/from-binary.en-us.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ location. When launched manually, Gitea can be killed using `Ctrl+C`.
4444

4545
## Recommended server configuration
4646

47+
**NOTE:** Many of the following directories can be configured using [Environment Variables]({{< relref "doc/advanced/specific-variables.en-us.md" >}}) as well!
48+
Of note, configuring `GITEA_WORK_DIR` will tell Gitea where to base its working directory, as well as ease installation.
49+
4750
### Prepare environment
4851

4952
Check that git is installed on the server, if it is not install it first.
@@ -66,9 +69,9 @@ adduser \
6669
### Create required directory structure
6770

6871
```sh
69-
mkdir -p /var/lib/gitea/{custom,data,indexers,public,log}
70-
chown git:git /var/lib/gitea/{data,indexers,log}
71-
chmod 750 /var/lib/gitea/{data,indexers,log}
72+
mkdir -p /var/lib/gitea/{custom,data,log}
73+
chown -R git:git /var/lib/gitea/
74+
chmod -R 750 /var/lib/gitea/
7275
mkdir /etc/gitea
7376
chown root:git /etc/gitea
7477
chmod 770 /etc/gitea
@@ -80,16 +83,33 @@ chmod 750 /etc/gitea
8083
chmod 644 /etc/gitea/app.ini
8184
```
8285

86+
### Configure Gitea's working directory
87+
88+
**NOTE:** If you plan on running Gitea as a Linux service, you can skip this step as the service file allows you to set `WorkingDirectory`. Otherwise, consider setting this environment variable (semi-)permanently so that Gitea consistently uses the correct working directory.
89+
```
90+
export GITEA_WORK_DIR=/var/lib/gitea/
91+
```
92+
8393
### Copy gitea binary to global location
8494

8595
```
8696
cp gitea /usr/local/bin/gitea
8797
```
8898

89-
### Create service file to start gitea automatically
99+
## Running Gitea
100+
101+
After the above steps, two options to run Gitea are:
102+
103+
### 1. Creating a service file to start Gitea automatically (recommended)
90104

91105
See how to create [Linux service]({{< relref "run-as-service-in-ubuntu.en-us.md" >}})
92106

107+
### 2. Running from command-line/terminal
108+
109+
```
110+
GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini
111+
```
112+
93113
## Updating to a new version
94114

95115
You can update to a new version of gitea by stopping gitea, replacing the binary at `/usr/local/bin/gitea` and restarting the instance.

models/models.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"net/url"
1313
"os"
1414
"path"
15+
"path/filepath"
1516
"strings"
1617

1718
"code.gitea.io/gitea/modules/log"
@@ -155,7 +156,7 @@ func LoadConfigs() {
155156
DbCfg.Passwd = sec.Key("PASSWD").String()
156157
}
157158
DbCfg.SSLMode = sec.Key("SSL_MODE").MustString("disable")
158-
DbCfg.Path = sec.Key("PATH").MustString("data/gitea.db")
159+
DbCfg.Path = sec.Key("PATH").MustString(filepath.Join(setting.AppDataPath, "gitea.db"))
159160
DbCfg.Timeout = sec.Key("SQLITE_TIMEOUT").MustInt(500)
160161
}
161162

0 commit comments

Comments
 (0)