Merge branch 'develop' of github.com:gogits/gogs into feature/page_issues

This commit is contained in:
Unknwon
2015-07-25 00:49:40 +08:00
49 changed files with 87 additions and 65 deletions

View File

@ -114,6 +114,7 @@ func runCert(ctx *cli.Context) {
SerialNumber: serialNumber,
Subject: pkix.Name{
Organization: []string{"Acme Co"},
CommonName: "Gogs",
},
NotBefore: notBefore,
NotAfter: notAfter,

View File

@ -82,7 +82,7 @@ func runServ(c *cli.Context) {
}
if len(c.Args()) < 1 {
fail("Not enough arguments", "Not enough arugments")
fail("Not enough arguments", "Not enough arguments")
}
keys := strings.Split(c.Args()[0], "-")
@ -97,7 +97,7 @@ func runServ(c *cli.Context) {
user, err := models.GetUserByKeyId(keyId)
if err != nil {
fail("internal error", "Fail to get user by key ID(%d): %v", keyId, err)
fail("internal error", "Failed to get user by key ID(%d): %v", keyId, err)
}
cmd := os.Getenv("SSH_ORIGINAL_COMMAND")
@ -113,7 +113,7 @@ func runServ(c *cli.Context) {
repoPath := strings.Trim(args, "'")
rr := strings.SplitN(repoPath, "/", 2)
if len(rr) != 2 {
fail("Invalid repository path", "Invalide repository path: %v", args)
fail("Invalid repository path", "Invalid repository path: %v", args)
}
repoUserName := rr[0]
repoName := strings.TrimSuffix(rr[1], ".git")
@ -123,7 +123,7 @@ func runServ(c *cli.Context) {
if err == models.ErrUserNotExist {
fail("Repository owner does not exist", "Unregistered owner: %s", repoUserName)
}
fail("Internal error", "Fail to get repository owner(%s): %v", repoUserName, err)
fail("Internal error", "Failed to get repository owner(%s): %v", repoUserName, err)
}
repo, err := models.GetRepositoryByName(repoUser.Id, repoName)
@ -135,7 +135,7 @@ func runServ(c *cli.Context) {
fail(_ACCESS_DENIED_MESSAGE, "Repository does not exist: %s/%s", repoUser.Name, repoName)
}
}
fail("Internal error", "Fail to get repository: %v", err)
fail("Internal error", "Failed to get repository: %v", err)
}
requestedMode, has := COMMANDS[verb]
@ -171,7 +171,7 @@ func runServ(c *cli.Context) {
gitcmd.Stdin = os.Stdin
gitcmd.Stderr = os.Stderr
if err = gitcmd.Run(); err != nil {
fail("Internal error", "Fail to execute git command: %v", err)
fail("Internal error", "Failed to execute git command: %v", err)
}
if requestedMode == models.ACCESS_MODE_WRITE {
@ -184,7 +184,7 @@ func runServ(c *cli.Context) {
err = models.Update(task.RefName, task.OldCommitId, task.NewCommitId,
user.Name, repoUserName, repoName, user.Id)
if err != nil {
log.GitLogger.Error(2, "Fail to update: %v", err)
log.GitLogger.Error(2, "Failed to update: %v", err)
}
}

View File

@ -343,6 +343,7 @@ releases=Veröffentlichungen
file_raw=Roh
file_history=Verlauf
file_view_raw=Ansicht Roh
file_permalink=Permalink
commits.commits=Commits
commits.search=Durchsuche Commits

View File

@ -353,6 +353,7 @@ releases = Releases
file_raw = Raw
file_history = History
file_view_raw = View Raw
file_permalink = Permalink
commits.commits = Commits
commits.search = Search commits

View File

@ -343,6 +343,7 @@ releases=Releases
file_raw=Raw
file_history=Histórico
file_view_raw=Ver Raw
file_permalink=Permalink
commits.commits=Commits
commits.search=Buscar Commits

View File

@ -343,6 +343,7 @@ releases=Publications
file_raw=Raw
file_history=Historique
file_view_raw=Voir le Raw
file_permalink=Permalink
commits.commits=Commissions
commits.search=Rechercher des commissions

View File

@ -343,6 +343,7 @@ releases=リリース
file_raw=生データ
file_history=履歴
file_view_raw=生データを見る
file_permalink=Permalink
commits.commits=コミット
commits.search=コミットの検索

View File

@ -341,6 +341,7 @@ releases=Laidieni
file_raw=Neapstrādāts
file_history=Vēsture
file_view_raw=Rādīt neapstrādātu
file_permalink=Permalink
commits.commits=Revīzijas
commits.search=Meklēt revīzijas

View File

@ -343,6 +343,7 @@ releases=Publicaties
file_raw=Ruwe
file_history=Geschiedenis
file_view_raw=Weergave ruwe
file_permalink=Permalink
commits.commits=Commits
commits.search=Zoeken

View File

@ -343,6 +343,7 @@ releases=Wydania
file_raw=Czysty
file_history=Historia
file_view_raw=Zobacz czysty
file_permalink=Permalink
commits.commits=Commity
commits.search=Przeszukaj commity

View File

@ -343,6 +343,7 @@ releases=Lançamentos
file_raw=Cru
file_history=Histórico
file_view_raw=Ver cru
file_permalink=Permalink
commits.commits=Commits
commits.search=Pesquisar commits

View File

@ -343,6 +343,7 @@ releases=Релизы
file_raw=Исходник
file_history=История
file_view_raw=Посмотреть исходник
file_permalink=Permalink
commits.commits=Коммиты
commits.search=Поиск коммитов

View File

@ -343,6 +343,7 @@ releases=版本发布
file_raw=原始文件
file_history=文件历史
file_view_raw=查看原始文件
file_permalink=Permalink
commits.commits=次代码提交
commits.search=搜索提交历史

View File

@ -341,6 +341,7 @@ releases=版本發佈
file_raw=原始文件
file_history=文件歷史
file_view_raw=查看原始文件
file_permalink=Permalink
commits.commits=次代碼提交
commits.search=搜索提交歷史

View File

@ -3,13 +3,13 @@ Docker
TOOLS ARE WRITTEN FOR TESTING AND TO SEE WHAT IT IS!
For this to work you will need the nifty docker tool [fig].
For this to work you will need the nifty docker tool [docker-compose].
The most simple setup will look like this:
```sh
./assemble_blocks.sh docker_gogs w_db option_db_mysql
fig up
docker-compose up
```
@ -22,21 +22,21 @@ How does it work
----------------
`./assemble_blocks.sh` will look in `blocks` for subdirectories.
In the subdirectories there are three relevant files: `Dockerfile`, `config` and `fig`.
In the subdirectories there are three relevant files: `Dockerfile`, `config` and `docker-compose`.
`Dockerfile` will be copied to `docker/` (also means last `Dockerfile` wins).
The `config` file contains lines which will in the gogs docker container end up in `$GOGS_PATH/custom/config/app.ini` and by this gogs will be configured.
Here you can define things like the MySQL server for your database block.
The `fig` file will just be added to `fig.yml`, which is used by fig to manage your containers.
The `docker-compose` file will just be added to `docker-compose.yml`, which is used by docker-compose to manage your containers.
This includes container linking!
Just have a look at them and it will be clear how to write your own blocks.
Just some things
- all files (`Dockerfile`, `fig` and `config`) are optional
- all files (`Dockerfile`, `docker-compose` and `config`) are optional
- the gogs block should always be the first block
Currently the blocks are designed that, the blocks that start with `docker` pull in the base docker image.
@ -57,14 +57,11 @@ Here is a more elaborated example
```sh
./assemble_blocks.sh docker_gogs w_db_cache_session option_db_postgresql option_cache_redis option_session_mysql
fig up
docker-compose up
```
This will set up four containters and link them proberly. One for each of
- gogs
- database (postgresql)
- cache (redis)
docker-compose
- session (mysql)
WARNING: This will not work at the Moment! MySQL session is broken!
@ -73,7 +70,7 @@ WARNING: This will not work at the Moment! MySQL session is broken!
Remark
------
After you execute `assemble_blocks.sh` you should always trigger `fig build` to inculde the the new init script `init_gogs.sh` in the docker image.
After you execute `assemble_blocks.sh` you should always trigger `docker-compose build` to inculde the the new init script `init_gogs.sh` in the docker image.
If you want to use another GoGS docker file, but keep everything else the same, you can create a block, e.g. `docker_gogs_custom`, with only a `Dockerfile` and call
@ -86,4 +83,4 @@ This will pull in the `Dockerfile` from `docker_gogs` instead of the one from `d
`Dockerfile`s for the `master` and `dev` branch are provided as `docker_gogs` and `docker_gogs_dev`
[fig]:http://www.fig.sh/
[docker-compose]:https://docs.docker.com/compose/

View File

@ -10,8 +10,8 @@ gogs_config_file=conf.tmp
gogs_config=config
gogs_init_file=$docker_dir/init_gogs.sh
fig_file=fig.yml
fig_config=fig
compose_file=docker-compose.yml
compose_config=docker-compose
gogs_init_template=$template_dir/init_gogs.sh.tpl
@ -28,7 +28,7 @@ if [ "$#" == 0 ]; then
exit 0
fi
for file in $gogs_config_file $fig_file; do
for file in $gogs_config_file $compose_file; do
if [ -e $file ]; then
echo "Deleting $file"
rm $file
@ -53,10 +53,10 @@ for dir in $@; do
echo "" >> $gogs_config_file
fi
if [ -e $current_dir/$fig_config ]; then
echo "Adding $current_dir/$fig_config to $fig_file"
cat $current_dir/fig >> $fig_file
echo "" >> $fig_file
if [ -e $current_dir/$compose_config ]; then
echo "Adding $current_dir/$compose_config to $compose_file"
cat $current_dir/$compose_config >> $compose_file
echo "" >> $compose_file
fi
done
@ -69,4 +69,4 @@ d
if [ -e $gogs_config_file ]; then
echo "Removing temporary GoGS config"
rm $gogs_config_file
fi
fi

View File

@ -1,23 +1,20 @@
FROM ubuntu:14.04
FROM buildpack-deps:trusty-scm
# This part is taken from the official docker image --------------------
RUN apt-get update && apt-get install -y \
build-essential ca-certificates curl \
bzr git mercurial openssh-client\
--no-install-recommends
build-essential --no-install-recommends
ENV GOLANG_VERSION 1.3
RUN curl -sSL http://golang.org/dl/go$GOLANG_VERSION.src.tar.gz \
| tar -v -C /usr/src -xz
WORKDIR /usr/src/go
RUN curl -sSL https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz \
| tar -v -C /usr/src -xz
RUN cd src && ./make.bash --no-clean 2>&1
RUN cd /usr/src/go/src && ./make.bash --no-clean 2>&1
ENV PATH /usr/src/go/bin:$PATH
RUN mkdir -p /go/src
RUN mkdir -p /go/src /go/bin && chmod -R 777 /go
ENV GOPATH /go
ENV PATH /go/bin:$PATH
WORKDIR /go

View File

@ -1,24 +1,20 @@
FROM ubuntu:14.04
FROM buildpack-deps:trusty-scm
# This part is derived from the official docker image ------------------
# This part is taken from the official docker image --------------------
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -qy \
build-essential ca-certificates curl \
bzr git mercurial openssh-client\
--no-install-recommends
RUN apt-get update && apt-get install -y \
build-essential --no-install-recommends
ENV GOLANG_VERSION 1.3
RUN curl -sSL http://golang.org/dl/go$GOLANG_VERSION.src.tar.gz \
| tar -v -C /usr/src -xz
WORKDIR /usr/src/go
RUN curl -sSL https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz \
| tar -v -C /usr/src -xz
RUN cd src && ./make.bash --no-clean 2>&1
RUN cd /usr/src/go/src && ./make.bash --no-clean 2>&1
ENV PATH /usr/src/go/bin:$PATH
RUN mkdir -p /go/src
RUN mkdir -p /go/src /go/bin && chmod -R 777 /go
ENV GOPATH /go
ENV PATH /go/bin:$PATH
WORKDIR /go

Some files were not shown because too many files have changed in this diff Show More