Skip to content

Commit

Permalink
Revert "Changes from gitea:master (go-gitea#130)"
Browse files Browse the repository at this point in the history
This reverts commit 17b247f.
  • Loading branch information
ethantkoenig committed Jan 27, 2017
1 parent 17b247f commit 1ce60ac
Show file tree
Hide file tree
Showing 548 changed files with 10,729 additions and 87,161 deletions.
36 changes: 7 additions & 29 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ workspace:
path: src/code.gitea.io/gitea

pipeline:
clone:
image: plugins/git
tags: true

test:
image: webhippie/golang:edge
pull: true
Expand Down Expand Up @@ -60,7 +56,7 @@ pipeline:
- make release
when:
event: [ push, tag ]
branch: [ master, release/*, refs/tags/* ]
branch: [ master, refs/tags/* ]

coverage:
image: plugins/coverage
Expand All @@ -71,19 +67,11 @@ pipeline:
docker:
image: plugins/docker
repo: gitea/gitea
tags: [ '${DRONE_TAG##v}' ]
tags: [ '${TAG}' ]
when:
event: [ tag ]
branch: [ refs/tags/* ]

docker:
image: plugins/docker
repo: gitea/gitea
tags: [ '${DRONE_BRANCH##release/v}' ]
when:
event: [ push ]
branch: [ release/* ]

docker:
image: plugins/docker
repo: gitea/gitea
Expand All @@ -97,30 +85,20 @@ pipeline:
path_style: true
strip_prefix: dist/release/
source: dist/release/*
target: /gitea/${DRONE_TAG##v}
when:
event: [ tag ]
branch: [ refs/tags/* ]

release:
image: plugins/s3
path_style: true
strip_prefix: dist/release/
source: dist/release/*
target: /gitea/${DRONE_BRANCH##release/v}
target: /gitea/master
when:
event: [ push ]
branch: [ release/* ]
branch: [ master ]

release:
image: plugins/s3
path_style: true
strip_prefix: dist/release/
source: dist/release/*
target: /gitea/master
target: /gitea/$$TAG
when:
event: [ push ]
branch: [ master ]
event: [ tag ]
branch: [ refs/tags/* ]

github:
image: plugins/github-release
Expand Down
2 changes: 1 addition & 1 deletion .drone.yml.sig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
eyJhbGciOiJIUzI1NiJ9.d29ya3NwYWNlOgogIGJhc2U6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yogXQoKICBnaXR0ZXI6CiAgICBpbWFnZTogcGx1Z2lucy9naXR0ZXIKCnNlcnZpY2VzOgogIG15c3FsOgogICAgaW1hZ2U6IG15c3FsOjUuNwogICAgZW52aXJvbm1lbnQ6CiAgICAgIC0gTVlTUUxfREFUQUJBU0U9dGVzdAogICAgICAtIE1ZU1FMX0FMTE9XX0VNUFRZX1BBU1NXT1JEPXllcwogICAgd2hlbjoKICAgICAgZXZlbnQ6IFsgcHVzaCBdCgogIHBnc3FsOgogICAgaW1hZ2U6IHBvc3RncmVzOjkuNQogICAgZW52aXJvbm1lbnQ6CiAgICAgIC0gUE9TVEdSRVNfREI9dGVzdAogICAgd2hlbjoKICAgICAgZXZlbnQ6IFsgcHVzaCBdCg.O00lMwJDnAI1CFYbrs1bAmspX4wA5ufdye66vq5lcWw
6 changes: 0 additions & 6 deletions .gitattributes

This file was deleted.

6 changes: 1 addition & 5 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
3. Please take a moment to search that an issue doesn't already exist.
4. Please give all relevant information below for bug reports, incomplete details will be handled as an invalid report.

**You MUST delete the content above including this line before posting, otherwise your issue will be invalid.**
**You MUST delete the content above including this line before posting, otherwise your pull request will be invalid.**

- Gitea version (or commit ref):
- Git version:
Expand All @@ -12,10 +12,6 @@
- [ ] PostgreSQL
- [ ] MySQL
- [ ] SQLite
- Can you reproduce the bug at https://try.gitea.io:
- [ ] Yes (provide example URL)
- [ ] No
- [ ] Not relevant
- Log gist:

## Description
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ _testmain.go

coverage.out

/modules/options/bindata.go
/modules/public/bindata.go
/modules/templates/bindata.go

Expand Down
56 changes: 0 additions & 56 deletions CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Before sending code out for review, run all the tests for the whole tree to make

Changes to Gitea must be reviewed before they are accepted, no matter who makes the change even if it is an owner or a maintainer. We use GitHub's pull request workflow to do that and we also use [LGTM](http://lgtm.co) to ensure every PR is reviewed by at least 2 maintainers.

Please try to make your pull request easy to review for us. Please read the "[How to get faster PR reviews](https://github.com/kubernetes/community/blob/master/contributors/devel/faster_reviews.md)" guide, it has lots of useful tips for any project you may want to contribute. Some of the key points:
Please try to make your pull request easy to review for us. Please read the "[How to get faster PR reviews](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md)" guide, it has lots of useful tips for any project you may want to contribute. Some of the key points:

* Make small pull requests. The smaller, the faster to review and the more likely it will be merged soon.
* Don't make changes unrelated to your PR. Maybe there are typos on some comments, maybe refactoring would be welcome on a function... but if that is not related to your PR, please make *another* PR for that.
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ RUN apk update && \
-s /bin/bash \
-u 1000 \
-G git \
git && \
echo "git:$(date +%s | sha256sum | base64 | head -c 32)" | chpasswd
git

ENV USER git
ENV GITEA_CUSTOM /data/gitea
Expand All @@ -39,4 +38,7 @@ ENTRYPOINT ["/usr/bin/entrypoint"]
CMD ["/bin/s6-svscan", "/etc/s6"]

COPY docker /

COPY public /app/gitea/public
COPY templates /app/gitea/templates
COPY gitea /app/gitea/gitea
6 changes: 4 additions & 2 deletions Dockerfile.rpi
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ RUN apk update && \
-s /bin/bash \
-u 1000 \
-G git \
git && \
echo "git:$(date +%s | sha256sum | base64 | head -c 32)" | chpasswd
git

ENV USER git
ENV GITEA_CUSTOM /data/gitea
Expand All @@ -39,4 +38,7 @@ ENTRYPOINT ["/usr/bin/entrypoint"]
CMD ["/bin/s6-svscan", "/etc/s6"]

COPY docker /

COPY public /app/gitea/public
COPY templates /app/gitea/templates
COPY gitea /app/gitea/gitea
1 change: 0 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Alexey Makhov <[email protected]> (@makhov)
Andrey Nering <[email protected]> (@andreynering)
Bo-Yi Wu <[email protected]> (@appleboy)
Kees de Vries <[email protected]> (@Bwko)
Kim Carlbäcker <[email protected]> (@bkcsoft)
LefsFlare <[email protected]> (@LefsFlarey)
Expand Down
41 changes: 24 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
DIST := dist
EXECUTABLE := gitea
IMPORT := code.gitea.io/gitea

ifeq ($(OS), Windows_NT)
EXECUTABLE := gitea.exe
else
EXECUTABLE := gitea
endif
SHA := $(shell git rev-parse --short HEAD)
DATE := $(shell date -u '+%Y-%m-%d %I:%M:%S %Z')

BINDATA := modules/{options,public,templates}/bindata.go
BINDATA := $(shell find conf | sed 's/ /\\ /g')
STYLESHEETS := $(wildcard public/less/index.less public/less/_*.less)
JAVASCRIPTS :=

LDFLAGS += -X "main.Version=$(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')"
LDFLAGS += -X "code.gitea.io/gitea/modules/setting.BuildTime=$(DATE)"
LDFLAGS += -X "code.gitea.io/gitea/modules/setting.BuildGitHash=$(SHA)"

TARGETS ?= linux/*,darwin/*,windows/*
PACKAGES ?= $(shell go list ./... | grep -v /vendor/)
Expand All @@ -20,10 +19,10 @@ SOURCES ?= $(shell find . -name "*.go" -type f)
TAGS ?=

ifneq ($(DRONE_TAG),)
VERSION ?= $(subst v,,$(DRONE_TAG))
VERSION ?= $(DRONE_TAG)
else
ifneq ($(DRONE_BRANCH),)
VERSION ?= $(subst release/v,,$(DRONE_BRANCH))
VERSION ?= $(DRONE_BRANCH)
else
VERSION ?= master
endif
Expand All @@ -35,11 +34,11 @@ all: build
.PHONY: clean
clean:
go clean -i ./...
rm -rf $(EXECUTABLE) $(DIST) $(BINDATA)
rm -rf $(EXECUTABLE) $(DIST)

.PHONY: fmt
fmt:
find . -name "*.go" -type f -not -path "./vendor/*" | xargs gofmt -s -w
go fmt $(PACKAGES)

.PHONY: vet
vet:
Expand Down Expand Up @@ -92,11 +91,6 @@ build: $(EXECUTABLE)
$(EXECUTABLE): $(SOURCES)
go build -v -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@

.PHONY: docker
docker:
docker run -ti --rm -v $(CURDIR):/srv/app/src/code.gitea.io/gitea -w /srv/app/src/code.gitea.io/gitea -e TAGS="$(TAGS)" webhippie/golang:edge make clean generate build
docker build -t gitea/gitea:latest .

.PHONY: release
release: release-dirs release-build release-copy release-check

Expand All @@ -122,6 +116,19 @@ release-copy:
release-check:
cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/release/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;)

.PHONY: bindata
bindata: modules/bindata/bindata.go

.IGNORE: modules/bindata/bindata.go
modules/bindata/bindata.go: $(BINDATA)
@which go-bindata > /dev/null; if [ $$? -ne 0 ]; then \
go get -u github.com/jteeuwen/go-bindata/...; \
fi
go-bindata -o=$@ -ignore="\\.go|README.md|TRANSLATORS" -pkg=bindata conf/...
go fmt $@
sed -i.bak 's/confLocaleLocale_/confLocaleLocale/' $@
rm $@.bak

.PHONY: javascripts
javascripts: public/js/index.js

Expand All @@ -137,4 +144,4 @@ public/css/index.css: $(STYLESHEETS)
lessc $< $@

.PHONY: assets
assets: javascripts stylesheets
assets: bindata javascripts stylesheets
Loading

0 comments on commit 1ce60ac

Please sign in to comment.