Skip to content

Commit 6e55a29

Browse files
committed
Merge branch 'master' into wiki_enable_side_by_side
2 parents c1c0f18 + 8ec6597 commit 6e55a29

File tree

286 files changed

+76039
-14516
lines changed

Some content is hidden

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

286 files changed

+76039
-14516
lines changed

.drone.yml

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ pipeline:
5252
image: webhippie/nodejs:latest
5353
pull: true
5454
commands:
55-
- npm install
5655
- make css
5756
- make js
5857
when:

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ coverage.all
6767
/node_modules
6868
/modules/indexer/issues/indexers
6969
routers/repo/authorized_keys
70-
/package-lock.json
7170
/yarn.lock
7271

7372
# Snapcraft

.npmrc

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
package-lock=false
21
save-exact=true

MAINTAINERS

+1
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ Andrew Thornton <[email protected]> (@zeripath)
2929
John Olheiser <[email protected]> (@jolheiser)
3030
Richard Mahn <[email protected]> (@richmahn)
3131
Mrsdizzie <[email protected]> (@mrsdizzie)
32+
silverwind <[email protected]> (@silverwind)

Makefile

+18-15
Original file line numberDiff line numberDiff line change
@@ -366,29 +366,32 @@ release-compress:
366366
fi
367367
cd $(DIST)/release/; for file in `find . -type f -name "*"`; do echo "compressing $${file}" && gxz -k -9 $${file}; done;
368368

369-
.PHONY: js
370-
js:
371-
@if ([ ! -d "$(PWD)/node_modules" ]); then \
372-
echo "node_modules directory is absent, please run 'npm install' first"; \
369+
npm-check:
370+
@hash npm > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
371+
echo "Please install Node.js 8.x or greater with npm"; \
373372
exit 1; \
374373
fi;
375374
@hash npx > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
376-
echo "Please install npm version 5.2+"; \
375+
echo "Please install Node.js 8.x or greater with npm"; \
377376
exit 1; \
378377
fi;
378+
379+
.PHONY: npm
380+
npm: npm-check
381+
npm install --no-save
382+
383+
.PHONY: npm-update
384+
npm-update: npm-check
385+
npx updates -cu
386+
rm -rf node_modules package-lock.json
387+
npm install --package-lock
388+
389+
.PHONY: js
390+
js: npm
379391
npx eslint public/js
380392

381393
.PHONY: css
382-
css:
383-
@if ([ ! -d "$(PWD)/node_modules" ]); then \
384-
echo "node_modules directory is absent, please run 'npm install' first"; \
385-
exit 1; \
386-
fi;
387-
@hash npx > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
388-
echo "Please install npm version 5.2+"; \
389-
exit 1; \
390-
fi;
391-
394+
css: npm
392395
npx lesshint public/less/
393396
npx lessc --clean-css="--s0 -b" public/less/index.less public/css/index.css
394397
$(foreach file, $(filter-out public/less/themes/_base.less, $(wildcard public/less/themes/*)),npx lessc --clean-css="--s0 -b" public/less/themes/$(notdir $(file)) > public/css/theme-$(notdir $(call strip-suffix,$(file))).css;)

cmd/serv.go

-22
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,13 @@ import (
1717
"time"
1818

1919
"code.gitea.io/gitea/models"
20-
"code.gitea.io/gitea/modules/git"
2120
"code.gitea.io/gitea/modules/log"
2221
"code.gitea.io/gitea/modules/pprof"
2322
"code.gitea.io/gitea/modules/private"
2423
"code.gitea.io/gitea/modules/setting"
2524

2625
"github.com/Unknwon/com"
2726
"github.com/dgrijalva/jwt-go"
28-
version "github.com/mcuadros/go-version"
2927
"github.com/urfave/cli"
3028
)
3129

@@ -46,29 +44,9 @@ var CmdServ = cli.Command{
4644
},
4745
}
4846

49-
func checkLFSVersion() {
50-
if setting.LFS.StartServer {
51-
//Disable LFS client hooks if installed for the current OS user
52-
//Needs at least git v2.1.2
53-
binVersion, err := git.BinVersion()
54-
if err != nil {
55-
fail("LFS server error", "Error retrieving git version: %v", err)
56-
}
57-
58-
if !version.Compare(binVersion, "2.1.2", ">=") {
59-
setting.LFS.StartServer = false
60-
println("LFS server support needs at least Git v2.1.2, disabled")
61-
} else {
62-
git.GlobalCommandArgs = append(git.GlobalCommandArgs, "-c", "filter.lfs.required=",
63-
"-c", "filter.lfs.smudge=", "-c", "filter.lfs.clean=")
64-
}
65-
}
66-
}
67-
6847
func setup(logPath string) {
6948
_ = log.DelLogger("console")
7049
setting.NewContext()
71-
checkLFSVersion()
7250
}
7351

7452
func parseCmd(cmd string) (string, string) {

docs/content/doc/advanced/hacking-on-gitea.en-us.md

+3-16
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,7 @@ make vet lint misspell-check
138138

139139
### Updating CSS
140140

141-
To generate the CSS, you will need [Node.js](https://nodejs.org/) 8.0 or greater and the build dependencies:
142-
143-
```bash
144-
npm install
145-
```
146-
147-
At present we use [less](http://lesscss.org/) and [postcss](https://postcss.org) to generate our CSS. Do
148-
**not** edit the files in `public/css` directly, as they are generated from `lessc` from the files in `public/less`.
141+
To generate the CSS, you will need [Node.js](https://nodejs.org/) 8.0 or greater with npm. At present we use [less](http://lesscss.org/) and [postcss](https://postcss.org) to generate our CSS. Do **not** edit the files in `public/css` directly, as they are generated from `lessc` from the files in `public/less`.
149142

150143
Edit files in `public/less`, run the linter, regenerate the CSS and commit all changed files:
151144

@@ -155,13 +148,7 @@ make css
155148

156149
### Updating JS
157150

158-
To run the JavaScript linter you will need [Node.js](https://nodejs.org/) 8.0 or greater and the build dependencies:
159-
160-
```bash
161-
npm install
162-
```
163-
164-
Edit files in `public/js` and run the linter:
151+
To run the JavaScript linter you will need [Node.js](https://nodejs.org/) 8.0 or greater with npm. Edit files in `public/js` and run the linter:
165152

166153
```bash
167154
make js
@@ -250,7 +237,7 @@ TAGS="bindata sqlite sqlite_unlock_notify" make generate build test-sqlite
250237
```
251238

252239
will run the integration tests in an sqlite environment. Other database tests
253-
are available but may need adjustment to the local environment.
240+
are available but may need adjustment to the local environment.
254241

255242
Look at
256243
[`integrations/README.md`](https://github.com/go-gitea/gitea/blob/master/integrations/README.md)

go.mod

+8-6
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ require (
4141
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect
4242
github.com/facebookgo/stats v0.0.0-20151006221625-1b76add642e4 // indirect
4343
github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 // indirect
44+
github.com/gliderlabs/ssh v0.1.4 // indirect
4445
github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd // indirect
4546
github.com/glycerine/goconvey v0.0.0-20190315024820-982ee783a72e // indirect
4647
github.com/go-macaron/binding v0.0.0-20160711225916-9440f336b443
@@ -60,6 +61,7 @@ require (
6061
github.com/gogits/chardet v0.0.0-20150115103509-2404f7772561
6162
github.com/gogits/cron v0.0.0-20160810035002-7f3990acf183
6263
github.com/gogo/protobuf v1.2.1 // indirect
64+
github.com/google/go-cmp v0.3.0 // indirect
6365
github.com/google/go-github/v24 v24.0.1
6466
github.com/gorilla/context v1.1.1
6567
github.com/issue9/assert v1.3.2 // indirect
@@ -90,7 +92,6 @@ require (
9092
github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5
9193
github.com/oliamb/cutter v0.2.2
9294
github.com/philhofer/fwd v1.0.0 // indirect
93-
github.com/pkg/errors v0.8.1 // indirect
9495
github.com/pquerna/otp v0.0.0-20160912161815-54653902c20e
9596
github.com/prometheus/client_golang v0.9.0
9697
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 // indirect
@@ -115,11 +116,12 @@ require (
115116
github.com/willf/bitset v0.0.0-20180426185212-8ce1146b8621 // indirect
116117
github.com/yohcop/openid-go v0.0.0-20160914080427-2c050d2dae53
117118
go.etcd.io/bbolt v1.3.2 // indirect
118-
golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480
119-
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519
119+
golang.org/x/crypto v0.0.0-20190618222545-ea8f1a30c443
120+
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980
120121
golang.org/x/oauth2 v0.0.0-20181101160152-c453e0c75759
121-
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e
122-
golang.org/x/text v0.3.0
122+
golang.org/x/sys v0.0.0-20190618155005-516e3c20635f
123+
golang.org/x/text v0.3.2
124+
golang.org/x/tools v0.0.0-20190618163018-fdf1049a943a // indirect
123125
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
124126
gopkg.in/asn1-ber.v1 v1.0.0-20150924051756-4e86f4367175 // indirect
125127
gopkg.in/bufio.v1 v1.0.0-20140618132640-567b2bfa514e // indirect
@@ -130,7 +132,7 @@ require (
130132
gopkg.in/macaron.v1 v1.3.2
131133
gopkg.in/redis.v2 v2.3.2 // indirect
132134
gopkg.in/src-d/go-billy.v4 v4.3.0
133-
gopkg.in/src-d/go-git.v4 v4.11.0
135+
gopkg.in/src-d/go-git.v4 v4.12.0
134136
gopkg.in/testfixtures.v2 v2.5.0
135137
mvdan.cc/xurls/v2 v2.0.0
136138
strk.kbt.io/projects/go/libravatar v0.0.0-20160628055650-5eed7bff870a

0 commit comments

Comments
 (0)