diff --git a/cmd/web.go b/cmd/web.go index 2bc9be457a..e0ef3a76a3 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -42,7 +42,7 @@ import ( var CmdWeb = cli.Command{ Name: "web", Usage: "Start Gogs web server", - Description: `Gogs web server is the only thing you need to run, + Description: `Gogs web server is the only thing you need to run, and it takes care of all the other things for you`, Action: runWeb, Flags: []cli.Flag{}, diff --git a/conf/app.ini b/conf/app.ini index 99ed628ec1..c646160e50 100644 --- a/conf/app.ini +++ b/conf/app.ini @@ -7,14 +7,14 @@ RUN_USER = git RUN_MODE = dev [repository] -ROOT = +ROOT = SCRIPT_TYPE = bash [server] PROTOCOL = http DOMAIN = localhost ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/ -HTTP_ADDR = +HTTP_ADDR = HTTP_PORT = 3000 SSH_PORT = 22 ; Disable CDN even in "prod" mode @@ -27,7 +27,7 @@ CERT_FILE = custom/https/cert.pem KEY_FILE = custom/https/key.pem ; Upper level of template and static file path ; default is the path where Gogs is executed -STATIC_ROOT_PATH = +STATIC_ROOT_PATH = ; Application level GZIP support ENABLE_GZIP = false @@ -87,20 +87,20 @@ SUBJECT = %(APP_NAME)s ; Mail server ; Gmail: smtp.gmail.com:587 ; QQ: smtp.qq.com:25 -HOST = +HOST = ; Mail from address -FROM = +FROM = ; Mailer user name and password -USER = -PASSWD = +USER = +PASSWD = [oauth] ENABLED = false [oauth.github] ENABLED = false -CLIENT_ID = -CLIENT_SECRET = +CLIENT_ID = +CLIENT_SECRET = SCOPES = https://api.github.com/user AUTH_URL = https://github.com/login/oauth/authorize TOKEN_URL = https://github.com/login/oauth/access_token @@ -109,16 +109,16 @@ TOKEN_URL = https://github.com/login/oauth/access_token ; https://console.developers.google.com/project [oauth.google] ENABLED = false -CLIENT_ID = -CLIENT_SECRET = +CLIENT_ID = +CLIENT_SECRET = SCOPES = https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile AUTH_URL = https://accounts.google.com/o/oauth2/auth TOKEN_URL = https://accounts.google.com/o/oauth2/token [oauth.qq] ENABLED = false -CLIENT_ID = -CLIENT_SECRET = +CLIENT_ID = +CLIENT_SECRET = SCOPES = all ; QQ 互联 ; AUTH_URL = https://graph.qq.com/oauth2.0/authorize @@ -129,8 +129,8 @@ TOKEN_URL = https://open.t.qq.com/cgi-bin/oauth2/access_token [oauth.weibo] ENABLED = false -CLIENT_ID = -CLIENT_SECRET = +CLIENT_ID = +CLIENT_SECRET = SCOPES = all AUTH_URL = https://api.weibo.com/oauth2/authorize TOKEN_URL = https://api.weibo.com/oauth2/access_token @@ -190,7 +190,7 @@ MAX_FILES = 10 ; Specifies the format for fully outputed dates. Defaults to RFC1123 ; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano ; For more information about the format see http://golang.org/pkg/time/#pkg-constants -FORMAT = +FORMAT = [log] ROOT_PATH = @@ -204,11 +204,11 @@ LEVEL = Trace ; For "console" mode only [log.console] -LEVEL = +LEVEL = ; For "file" mode only [log.file] -LEVEL = +LEVEL = ; This enables automated log rotate(switch of following options), default is true LOG_ROTATE = true ; Max line number of single file, default is 1000000 @@ -222,7 +222,7 @@ MAX_DAYS = 7 ; For "conn" mode only [log.conn] -LEVEL = +LEVEL = ; Reconnect host for every single message, default is false RECONNECT_ON_MSG = false ; Try to reconnect when connection is lost, default is false @@ -230,28 +230,28 @@ RECONNECT = false ; Either "tcp", "unix" or "udp", default is "tcp" PROTOCOL = tcp ; Host address -ADDR = +ADDR = ; For "smtp" mode only [log.smtp] -LEVEL = +LEVEL = ; Name displayed in mail title, default is "Diagnostic message from serve" SUBJECT = Diagnostic message from serve ; Mail server -HOST = +HOST = ; Mailer user name and password -USER = +USER = PASSWD = ; Receivers, can be one or more, e.g. ["1@example.com","2@example.com"] -RECEIVERS = +RECEIVERS = ; For "database" mode only [log.database] -LEVEL = +LEVEL = ; Either "mysql" or "postgres" -DRIVER = +DRIVER = ; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8 -CONN = +CONN = [i18n] LANGS = en-US,zh-CN,de-DE diff --git a/conf/gitignore/C Sharp b/conf/gitignore/C Sharp index 8ec39a1dc8..d26d7cd598 100644 --- a/conf/gitignore/C Sharp +++ b/conf/gitignore/C Sharp @@ -59,7 +59,7 @@ _ReSharper* *.ncrunch* .*crunch*.local.xml -# Installshield output folder +# Installshield output folder [Ee]xpress # DocProject is a documentation generator add-in diff --git a/modules/auth/ldap/README.md b/modules/auth/ldap/README.md index 8b508e0fe0..531ba85361 100644 --- a/modules/auth/ldap/README.md +++ b/modules/auth/ldap/README.md @@ -13,7 +13,7 @@ If there's connection error, the server will be disabled and won't be checked ag ## Usage -In the [security] section, set +In the [security] section, set > LDAP_AUTH = true then for each LDAP source, set diff --git a/public/css/gogs.css b/public/css/gogs.css index cfa113411b..2d30d06284 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -1266,7 +1266,7 @@ body { #issue .issue-child .issue-content .user .avatar { height: 21px; width: 21px; -} +} #issue .issue-line { border-color: #CCC; @@ -1808,7 +1808,7 @@ body { position: absolute; top: 0px; bottom: 0px; - + margin: 5px; padding: 8px; diff --git a/public/fonts/fontawesome-webfont.svg b/public/fonts/fontawesome-webfont.svg index a9f8469503..047844b8ef 100755 --- a/public/fonts/fontawesome-webfont.svg +++ b/public/fonts/fontawesome-webfont.svg @@ -501,4 +501,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/js/app.js b/public/js/app.js index 9dea65eb85..a5bb9569ef 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -546,7 +546,7 @@ function initIssue() { if ($textArea.attr("id") == "issue-reply-content") { var $closeBtn = $('#issue-close-btn'); var $openBtn = $('#issue-open-btn'); - + if ($textArea.val().length) { $closeBtn.val($closeBtn.data("text")); $openBtn.val($openBtn.data("text")); @@ -575,7 +575,7 @@ function initIssue() { $hoverImage.addClass("attachment-preview-img"); $hoverElement.append($hoverImage); - $(document.body).append($hoverElement); + $(document.body).append($hoverElement); var over = function() { var $this = $(this); @@ -605,7 +605,7 @@ function initIssue() { $hoverElement.css({"top": top + "px", "left": left + "px"}); $hoverElement.css({"height": height + 16, "width": width + 16}); $hoverElement.show(); - }); + }); } else { $hoverElement.show(); } @@ -624,7 +624,7 @@ function initIssue() { var $addButton = $("#attachments-button"); var files = []; var fileInput = document.getElementById("attachments-input"); - + if (fileInput === null) { return; } @@ -635,9 +635,9 @@ function initIssue() { files.splice($parent.data("index"), 1); $parent.remove(); }); - + var clickedButton; - + $('input[type="submit"],input[type="button"],button.btn-success', fileInput.form).on('click', function() { clickedButton = this; @@ -722,7 +722,7 @@ function initIssue() { xhr.open("POST", this.action, true); xhr.send(data); - + return false; }); @@ -826,7 +826,7 @@ function initIssue() { //window.location.reload(); $a.data("assigned", uid); - if (uid > 0) { + if (uid > 0) { $('.clear-assignee').toggleShow(); $(".assignee > p").html('' + text + ''); } else { @@ -862,12 +862,12 @@ function initIssue() { $('.clear-milestone').toggleShow(); } $('.milestone', '#issue').on('click', 'li.milestone-item', function () { - var id = $(this).data("id"); + var id = $(this).data("id"); if (is_issue_bar) { var m = $m.data("milestone"); if (id != m) { var text = $(this).text(); - + $.post($m.data("ajax"), { issue: $('#issue').data("id"), milestone: id @@ -876,7 +876,7 @@ function initIssue() { //window.location.reload(); $m.data("milestone", id); - if (id > 0) { + if (id > 0) { $('.clear-milestone').toggleShow(); $(".milestone > .name").html('' + text + ''); } else { @@ -982,7 +982,7 @@ function initIssue() { $(item).addClass("no-checked"); $("#label-" + id, $labels).remove(); - + if ($labels.children(".label-item").length == 0) { $labels.append("

None yet

"); } @@ -991,7 +991,7 @@ function initIssue() { $(item).removeClass("no-checked"); $(item).addClass("checked"); - + $("p:not([class])", $labels).remove(); var $l = $("

"); diff --git a/public/ng/fonts/fontawesome-webfont.svg b/public/ng/fonts/fontawesome-webfont.svg index a9f8469503..047844b8ef 100755 --- a/public/ng/fonts/fontawesome-webfont.svg +++ b/public/ng/fonts/fontawesome-webfont.svg @@ -501,4 +501,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/ng/less/gogs/base.less b/public/ng/less/gogs/base.less index 0ca733c519..241846dbbd 100644 --- a/public/ng/less/gogs/base.less +++ b/public/ng/less/gogs/base.less @@ -254,11 +254,11 @@ clear: both; .table { width: 100%; max-width: 100%; - > thead > tr > th, - > tbody > tr > th, - > tfoot > tr > th, - > thead > tr > td, - > tbody > tr > td, + > thead > tr > th, + > tbody > tr > th, + > tfoot > tr > th, + > thead > tr > td, + > tbody > tr > td, > tfoot > tr > td { border-top: 1px solid #e7eaec; line-height: 1.42857; @@ -268,7 +268,7 @@ clear: both; th { text-align: left; } -} +} .table-striped { >tbody>tr:nth-child(odd)>td, >tbody>tr:nth-child(odd)>th { diff --git a/public/ng/less/gogs/dashboard.less b/public/ng/less/gogs/dashboard.less index 6bf1150ba7..afef60cfab 100644 --- a/public/ng/less/gogs/dashboard.less +++ b/public/ng/less/gogs/dashboard.less @@ -189,8 +189,8 @@ The dashboard page style } } a { - text-overflow: ellipsis; - -o-text-overflow: ellipsis; + text-overflow: ellipsis; + -o-text-overflow: ellipsis; overflow: hidden; } } diff --git a/scripts/dockerfiles/build.sh b/scripts/dockerfiles/build.sh index 4617da1421..36f6a468a1 100755 --- a/scripts/dockerfiles/build.sh +++ b/scripts/dockerfiles/build.sh @@ -21,13 +21,13 @@ fi # Replace the database root password in database image Dockerfile. sed -i "s/THE_DB_PASSWORD/$DB_PASSWORD/g" images/$DB_TYPE/Dockerfile -# Replace the database root password in gogits image deploy.sh file. +# Replace the database root password in gogits image deploy.sh file. sed -i "s/THE_DB_PASSWORD/$DB_PASSWORD/g" images/gogits/deploy.sh -# Replace the apt source in gogits image Dockerfile. +# Replace the apt source in gogits image Dockerfile. sed -i "s/#$APT_SOURCE#//" images/gogits/Dockerfile # Uncomment the installation of database lib in gogs Dockerfile sed -i "s/#$DB_TYPE#//" images/gogits/Dockerfile -# Replace the database type in gogits image deploy.sh file. +# Replace the database type in gogits image deploy.sh file. sed -i "s/THE_DB_TYPE/$DB_TYPE/g" images/gogits/deploy.sh if [ $MEM_TYPE != "" ] diff --git a/scripts/dockerfiles/images/gogits/Dockerfile b/scripts/dockerfiles/images/gogits/Dockerfile index a171e15e3b..bda9e424dd 100644 --- a/scripts/dockerfiles/images/gogits/Dockerfile +++ b/scripts/dockerfiles/images/gogits/Dockerfile @@ -3,7 +3,7 @@ MAINTAINER Meaglith Ma (@genedna) #aliyun#RUN echo "deb http://mirrors.aliyun.com/ubuntu/ saucy main restricted" > /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-updates main restricted" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy universe" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-updates universe" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy multiverse" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-updates multiverse" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-backports main restricted universe multiverse" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-security main restricted" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-security universe" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-security multiverse" >> /etc/apt/sources.list -#nchc#RUN echo "deb http://free.nchc.org.tw/ubuntu/ saucy main restricted" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy main restricted" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-updates main restricted" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-updates main restricted" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy universe" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy universe" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-updates universe" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-updates universe" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy multiverse" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-updates multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-updates multiverse" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-backports main restricted universe multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-backports main restricted universe multiverse" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-security main restricted" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-security main restricted" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-security universe" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-security universe" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-security multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-security multiverse" >> /etc/apt/source.list && echo "deb http://extras.ubuntu.com/ubuntu saucy main" >> /etc/apt/source.list && echo "deb-src http://extras.ubuntu.com/ubuntu saucy main" >> /etc/apt/source.list +#nchc#RUN echo "deb http://free.nchc.org.tw/ubuntu/ saucy main restricted" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy main restricted" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-updates main restricted" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-updates main restricted" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy universe" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy universe" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-updates universe" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-updates universe" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy multiverse" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-updates multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-updates multiverse" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-backports main restricted universe multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-backports main restricted universe multiverse" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-security main restricted" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-security main restricted" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-security universe" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-security universe" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-security multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-security multiverse" >> /etc/apt/source.list && echo "deb http://extras.ubuntu.com/ubuntu saucy main" >> /etc/apt/source.list && echo "deb-src http://extras.ubuntu.com/ubuntu saucy main" >> /etc/apt/source.list RUN mkdir -p /go ENV PATH /usr/local/go/bin:/go/bin:$PATH @@ -16,7 +16,7 @@ RUN apt-get install -yq vim sudo RUN curl -sL https://golang.org/dl/go1.3.linux-amd64.tar.gz | tar -v -C /usr/local -xz RUN cd /usr/local/go/src && ./make.bash --no-clean 2>&1 -RUN go get -u -d github.com/gogits/gogs +RUN go get -u -d github.com/gogits/gogs RUN cd $GOPATH/src/github.com/gogits/gogs && git checkout dev && git pull origin dev && go install && go build -tags redis # Clean all the unused packages diff --git a/scripts/dockerfiles/images/gogits/deploy.sh b/scripts/dockerfiles/images/gogits/deploy.sh index 9408524820..4f7e7a5b0f 100644 --- a/scripts/dockerfiles/images/gogits/deploy.sh +++ b/scripts/dockerfiles/images/gogits/deploy.sh @@ -9,15 +9,15 @@ MEM_TYPE=THE_MEM_TYPE DB_TYPE_LINE=`awk '$0 ~ str{print NR}' str="DB_TYPE = mysql" $GOPATH/src/github.com/gogits/gogs/conf/app.ini` DB_PASSWORD_LINE=`awk '$0 ~ str{print NR+1}' str="USER = root" $GOPATH/src/github.com/gogits/gogs/conf/app.ini` -sed -i "${DB_TYPE_LINE}s/.*$/DB_TYPE = $DB_TYPE/g" $GOPATH/src/github.com/gogits/gogs/conf/app.ini -sed -i "${DB_PASSWORD_LINE}s/.*$/PASSWD = $DB_PASSWORD/g" $GOPATH/src/github.com/gogits/gogs/conf/app.ini +sed -i "${DB_TYPE_LINE}s/.*$/DB_TYPE = $DB_TYPE/g" $GOPATH/src/github.com/gogits/gogs/conf/app.ini +sed -i "${DB_PASSWORD_LINE}s/.*$/PASSWD = $DB_PASSWORD/g" $GOPATH/src/github.com/gogits/gogs/conf/app.ini if [ $MEM_TYPE != "" ] then MEM_HOST_LINE=`awk '$0 ~ str{print NR+6}' str="ADAPTER = memory" $GOPATH/src/github.com/gogits/gogs/conf/app.ini` - + _MEM_ADDR=`echo $MEM_PORT | cut -d '/' -f 3 | cut -d ':' -f 1` _MEM_PORT=`echo $MEM_PORT | cut -d '/' -f 3 | cut -d ':' -f 2` @@ -54,7 +54,7 @@ fi #sed -i "/HOST = 127.0.0.1:3306/c\HOST = $DB_PORT_3306_TCP_ADDR:$DB_PORT_3306_TCP_PORT" $GOPATH/src/github.com/gogits/gogs/conf/app.ini sed -i "/HOST = 127.0.0.1:3306/c\HOST = `echo $DB_PORT | cut -d '/' -f 3`" $GOPATH/src/github.com/gogits/gogs/conf/app.ini -cd $GOPATH/src/github.com/gogits/gogs/ +cd $GOPATH/src/github.com/gogits/gogs/ # The sudo is a must here, or the go within docker container won't get the current user by os.Getenv("USERNAME") sudo ./gogs web diff --git a/scripts/dockerfiles/images/memcache/Dockerfile b/scripts/dockerfiles/images/memcache/Dockerfile index a1a2b6ee41..d3a54d9548 100644 --- a/scripts/dockerfiles/images/memcache/Dockerfile +++ b/scripts/dockerfiles/images/memcache/Dockerfile @@ -13,7 +13,7 @@ RUN apt-get install -y memcached EXPOSE 11211 # Default Memcached run command arguments -# Change to limit memory when creating container in Tutum +# Change to limit memory when creating container in Tutum CMD ["-m", "64"] # Set the user to run Memcached daemon diff --git a/scripts/dockerfiles/images/mysql/Dockerfile b/scripts/dockerfiles/images/mysql/Dockerfile index a9a72e35c4..bbf5c0a834 100644 --- a/scripts/dockerfiles/images/mysql/Dockerfile +++ b/scripts/dockerfiles/images/mysql/Dockerfile @@ -6,20 +6,20 @@ MAINTAINER Meaglith Ma (@genedna) RUN apt-get install -y --force-yes software-properties-common RUN add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe" RUN apt-get --yes --force-yes update -RUN apt-get --yes --force-yes upgrade +RUN apt-get --yes --force-yes upgrade ENV MYSQL_PASSWORD THE_DB_PASSWORD -RUN echo "mysql-server mysql-server/root_password password $MYSQL_PASSWORD" | debconf-set-selections +RUN echo "mysql-server mysql-server/root_password password $MYSQL_PASSWORD" | debconf-set-selections RUN echo "mysql-server mysql-server/root_password_again password $MYSQL_PASSWORD" | debconf-set-selections -RUN apt-get update && apt-get install -y --force-yes mysql-server +RUN apt-get update && apt-get install -y --force-yes mysql-server RUN sed -i -e"s/^bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" /etc/mysql/my.cnf RUN service mysql restart -RUN echo "mysql -uroot -p$MYSQL_PASSWORD -e 'drop database if exists gogs;'" >> import.sh -RUN echo "mysql -uroot -p$MYSQL_PASSWORD -e 'create database gogs;'" >> import.sh +RUN echo "mysql -uroot -p$MYSQL_PASSWORD -e 'drop database if exists gogs;'" >> import.sh +RUN echo "mysql -uroot -p$MYSQL_PASSWORD -e 'create database gogs;'" >> import.sh RUN chmod +x import.sh RUN apt-get autoremove -y @@ -32,4 +32,4 @@ RUN /usr/sbin/mysqld & \ EXPOSE 3306 -CMD ["/usr/bin/mysqld_safe", "--skip-syslog", "--log-error=/dev/null"] +CMD ["/usr/bin/mysqld_safe", "--skip-syslog", "--log-error=/dev/null"] diff --git a/scripts/dockerfiles/images/postgres/Dockerfile b/scripts/dockerfiles/images/postgres/Dockerfile index 9d76873c98..7934999228 100644 --- a/scripts/dockerfiles/images/postgres/Dockerfile +++ b/scripts/dockerfiles/images/postgres/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu MAINTAINER SvenDowideit@docker.com # Add the PostgreSQL PGP key to verify their Debian packages. -# It should be the same key as https://www.postgresql.org/media/keys/ACCC4CF8.asc +# It should be the same key as https://www.postgresql.org/media/keys/ACCC4CF8.asc RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 # Add PostgreSQL's repository. It contains the most recent stable release @@ -20,7 +20,7 @@ RUN apt-get -y -q install python-software-properties software-properties-common RUN apt-get -y -q install postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 # Note: The official Debian and Ubuntu images automatically ``apt-get clean`` -# after each ``apt-get`` +# after each ``apt-get`` # Run the rest of the commands as the ``postgres`` user created by the ``postgres-9.3`` package when it was ``apt-get installed`` USER postgres @@ -34,7 +34,7 @@ RUN /etc/init.d/postgresql start &&\ createdb -O root gogs # Adjust PostgreSQL configuration so that remote connections to the -# database are possible. +# database are possible. RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf # And add ``listen_addresses`` to ``/etc/postgresql/9.3/main/postgresql.conf`` diff --git a/scripts/gogs_supervisord.sh b/scripts/gogs_supervisord.sh index 3038407ed4..4488960e6a 100755 --- a/scripts/gogs_supervisord.sh +++ b/scripts/gogs_supervisord.sh @@ -5,8 +5,8 @@ echo 'plase remember to modify the command path in etc/supervisord.conf(line 23) PID="/tmp/supervisord.pid" CONF="etc/supervisord.conf" -LOGDIR="log" -if [ ! -d $LOGDIR ]; then +LOGDIR="log" +if [ ! -d $LOGDIR ]; then mkdir $LOGDIR fi diff --git a/scripts/start.sh b/scripts/start.sh index dd9a461c4c..85de4556ff 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -5,7 +5,7 @@ # # start gogs web # -IFS=' +IFS=' ' PATH=/bin:/usr/bin:/usr/local/bin USER=$(whoami) diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl index 12d47d2869..8f9f5ccc01 100644 --- a/templates/admin/auth/new.tmpl +++ b/templates/admin/auth/new.tmpl @@ -26,7 +26,7 @@ -
+
diff --git a/templates/home.tmpl b/templates/home.tmpl index 2825e14ad8..ba9cbe402b 100644 --- a/templates/home.tmpl +++ b/templates/home.tmpl @@ -1,4 +1,4 @@ -{{template "ng/base/head" .}} +{{template "ng/base/head" .}} {{template "ng/base/header" .}}
diff --git a/templates/install.tmpl b/templates/install.tmpl index 9ba610b62d..bf443de5a0 100644 --- a/templates/install.tmpl +++ b/templates/install.tmpl @@ -87,7 +87,7 @@

The user has access to visit and run Gogs.

- +
@@ -95,7 +95,7 @@

This affects SSH clone URL.

- +
diff --git a/templates/mail/notify/collaborator.tmpl b/templates/mail/notify/collaborator.tmpl index 0664b4c640..36a3149daa 100644 --- a/templates/mail/notify/collaborator.tmpl +++ b/templates/mail/notify/collaborator.tmpl @@ -10,7 +10,7 @@

---
- View it on Gogs: + View it on Gogs:
{{.AppUrl}}{{.RepoLink}}

diff --git a/templates/org/team/new.tmpl b/templates/org/team/new.tmpl index ce8c15236b..f9632fcfd4 100644 --- a/templates/org/team/new.tmpl +++ b/templates/org/team/new.tmpl @@ -30,15 +30,15 @@

{{.i18n.Tr "org.team_permission_desc"}}

- {{.i18n.Tr "org.teams.read_access"}} + {{.i18n.Tr "org.teams.read_access"}}

{{.i18n.Tr "org.teams.read_access_helper"}}

- {{.i18n.Tr "org.teams.write_access"}} + {{.i18n.Tr "org.teams.write_access"}}

{{.i18n.Tr "org.teams.write_access_helper"}}

- {{.i18n.Tr "org.teams.admin_access"}} + {{.i18n.Tr "org.teams.admin_access"}}

{{.i18n.Tr "org.teams.admin_access_helper"}}

diff --git a/templates/repo/bare.tmpl b/templates/repo/bare.tmpl index 60000647d3..5b943bad63 100644 --- a/templates/repo/bare.tmpl +++ b/templates/repo/bare.tmpl @@ -14,7 +14,7 @@
-
+ diff --git a/templates/repo/issue/create.tmpl b/templates/repo/issue/create.tmpl index c018884272..9b5468397d 100644 --- a/templates/repo/issue/create.tmpl +++ b/templates/repo/issue/create.tmpl @@ -104,8 +104,8 @@
{{if .AttachmentsEnabled}}
-
- Attachments: +
+ Attachments:
{{end}} diff --git a/templates/repo/issue/view.tmpl b/templates/repo/issue/view.tmpl index 3828928aa6..ff68ce0cc9 100644 --- a/templates/repo/issue/view.tmpl +++ b/templates/repo/issue/view.tmpl @@ -45,19 +45,19 @@
Loading...
-
+
{{with $attachments := .Issue.Attachments}} {{if $attachments}}
Attachments: - + {{range $attachments}} {{.Name}} {{end}}
{{end}} - {{end}} + {{end}}
{{range .Comments}} {{/* 0 = COMMENT, 1 = REOPEN, 2 = CLOSE, 3 = ISSUE, 4 = COMMIT, 5 = PULL */}} @@ -145,7 +145,7 @@ {{if .AttachmentsEnabled}}
- Attachments: + Attachments:
{{end}} diff --git a/templates/repo/settings/collaboration.tmpl b/templates/repo/settings/collaboration.tmpl index deb09e1f54..fe4ec49868 100644 --- a/templates/repo/settings/collaboration.tmpl +++ b/templates/repo/settings/collaboration.tmpl @@ -44,4 +44,4 @@
-{{template "ng/base/footer" .}} \ No newline at end of file +{{template "ng/base/footer" .}} \ No newline at end of file diff --git a/templates/repo/single_file.tmpl b/templates/repo/single_file.tmpl index 8c09f3ec1c..0ce04e13ba 100644 --- a/templates/repo/single_file.tmpl +++ b/templates/repo/single_file.tmpl @@ -21,7 +21,7 @@ {{end}} - + {{if not .FileIsText}}
{{if .IsImageFile}} diff --git a/templates/user/auth/activate.tmpl b/templates/user/auth/activate.tmpl index acdad9e80b..6a9e0b0d52 100644 --- a/templates/user/auth/activate.tmpl +++ b/templates/user/auth/activate.tmpl @@ -1,4 +1,4 @@ -{{template "ng/base/head" .}} +{{template "ng/base/head" .}} {{template "ng/base/header" .}}
diff --git a/templates/user/auth/forgot_passwd.tmpl b/templates/user/auth/forgot_passwd.tmpl index 3b5512673b..3e9f76e935 100644 --- a/templates/user/auth/forgot_passwd.tmpl +++ b/templates/user/auth/forgot_passwd.tmpl @@ -1,4 +1,4 @@ -{{template "ng/base/head" .}} +{{template "ng/base/head" .}} {{template "ng/base/header" .}}
diff --git a/templates/user/auth/reset_passwd.tmpl b/templates/user/auth/reset_passwd.tmpl index d17abde2ba..3c9da96b67 100644 --- a/templates/user/auth/reset_passwd.tmpl +++ b/templates/user/auth/reset_passwd.tmpl @@ -1,4 +1,4 @@ -{{template "ng/base/head" .}} +{{template "ng/base/head" .}} {{template "ng/base/header" .}}
diff --git a/templates/user/dashboard/dashboard.tmpl b/templates/user/dashboard/dashboard.tmpl index d0789b96d6..df4fc0b65e 100644 --- a/templates/user/dashboard/dashboard.tmpl +++ b/templates/user/dashboard/dashboard.tmpl @@ -11,7 +11,7 @@

- {{.GetActUserName}} + {{.GetActUserName}} {{if eq .GetOpType 1}} {{$.i18n.Tr "action.create_repo" .GetRepoLink .GetRepoLink | Str2html}} {{else if eq .GetOpType 5}} diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index 4f80f1659d..fe4e32f703 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -9,7 +9,7 @@ {{if .Owner.FullName}}{{.Owner.FullName}}{{end}} {{.Owner.Name}}

- +
    {{if .Owner.Location}}