Commit Graph

40 Commits (0b86aa5d29478c2316f6f29eb5fdcfb074b459b6)

Author SHA1 Message Date
ᴜɴᴋɴᴡᴏɴ 52ffb67b33
conf: overhaul email settings (#5940) 2020-02-25 00:35:35 +08:00
ᴜɴᴋɴᴡᴏɴ 648d9e253c
conf: overhaul server settings (#5928)
* conf: rename package

* Requires Go 1.12

* Fix lint

* Fix lint

* Overhaul

* db: fix tests

* Save my work

* Fix tests

* Server.UnixSocketPermission

* Server.LocalRootURL

* SSH settings

* Server.OfflineMode

* Save my work

* App.Version

* Remove [server] STATIC_ROOT_PATH

* Server.LandingURL
2020-02-22 09:05:26 +08:00
ᴜɴᴋɴᴡᴏɴ 3a2b2de814
Makefile: generate Sourcemap for less files
[CI SKIP]
2020-02-19 16:53:51 +08:00
ᴜɴᴋɴᴡᴏɴ bbffd1b5b6
docker: fix Docker Hub build failure 2020-02-18 20:19:12 +08:00
Michael Li 4d83fd4238
Use go-bindata to embed `public` and `templates` files into binary (#5920)
* fixed private repositories are hidden in the organization's view

* use go-bindata integrate public and templates files to gogs binary

* optimize Dockerfile don't COPY public and templates files

* use kevinburke's go-bindata to generate assets code

* reset develepment as default run mode in configure file

* optimize generated assets code relayout and help function

* fixed code format

* Update conf/app.ini

* assets: add LICENSE headers

* Some housekeeping

* assets/public: simplify code logic

* assets/templates: simplify code logic

* cmd/web: more concise variable names

* Minor changes

* Add custom public and templates support back

Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
2020-02-17 22:48:24 +08:00
Unknwon c9e712d07b
Makefile: set -trimpath on build
[ci skip]
2019-10-25 13:16:34 -07:00
Unknwon 01c8df01ec
internal: move packages under this directory (#5836)
* Rename pkg -> internal

* Rename routes -> route

* Move route -> internal/route

* Rename models -> db

* Move db -> internal/db

* Fix route2 -> route

* Move cmd -> internal/cmd

* Bump version
2019-10-24 01:51:46 -07:00
Unknwon 1a17c2ba1f
Makefile: use go build to replace go install 2019-10-15 14:37:42 -07:00
Unknwon 091f63fd4e
Makefile: only read GOPATH from env var
[ci skip]
2018-09-18 12:33:14 -04:00
Unknwon 376a629c9f
repo: add changes to repository avatar feature (#5221) 2018-06-17 22:18:41 +08:00
Sergey Dryabzhinsky 303fa37b60 repo: support avatars (#5221)
* First code for repository avatars

* Last code for repository avatars

- add new option for repo avatars location on filesystem
- add route catch in web
- add new fields to repo model
- add migration
- update settings handlers
- update repo header template

* Update locale messages

* Add repo avatars to home page

* Add repo avatars to organization right panel

* Show repo avatars in repo list

* Remove AvatarEamil field, remove Gravatar support, use generic locale messages

* Fix migration

* Fix seed and not used tool

* Revert public css changes, add them to less files

* Latest lessc (2.6.0) don't put result into file but output to stdout

So redirect output to file

* Simplify things:

- migration don't needed, and table changes too
- just upload file to repo avatar storage
- or generate random image

* Fix repo image seed - name not unique

* Get rid of not needed model fields

* Class value is enough, remove height attribute

* Don't generate random avatar for repository

- use html and semantic ui icons if no avatar found

* Update styles and templates for repo

- use repo icon as default avatar
- use globe icon for public repos
- add micro style for repo avatars at dashboard

* Remvoe redundant empty line

* Fix nl2br filter - must return string

* Fix css style for micro-repo-avatar in dashboard list

* Remove `|len`, works fine w/o it.

* Update after review 2:

- use static route for repository avatar
- format images settings block in settings

* Update after review 2:

- no random avatar for repo

* Update after review 2:

- no random avatar for repo 2
- update imports
- update UploadAvatar* functions

* Update after review 2:

- update templates

* Fix trace call

* Remove unused immport since we use static route for repo avatars.
2018-06-17 20:21:52 +08:00
Michael Li b152cbe45a Makefile: fix make build failure when environment of GOPATH have multiple items (#5262)
* fixed make build failure when enviroment of GOPATH have Multiple items

gogs source in /other/path/to/go/src/github.com/gogs/gogs and then

>cd /other/path/go/go/src/github.com/gogs/gogs
>GOPATH=/path/to/go:/other/path/to/go make

will also build success in this fixed code

* in makefile rename gogits to gogs
2018-06-04 18:41:54 +08:00
Unknwon f2ecfdc96a
auth: support authentication source config file (#3142) 2018-04-12 09:55:58 -04:00
Unknwon b752fe6808
MISC: bump version 2017-11-19 13:29:06 -05:00
Unknwon 3a6623104f
Makefile: correct errors 2017-07-14 16:48:55 -04:00
Unknwon a617d52374
2fa: initial support (#945) 2017-04-06 00:14:30 -04:00
Unknwon d05395fe90
Refactoring: rename modules -> pkg
Reasons to change:

1. Shorter than 'modules'
2. More generally used by other Go projects
3. Corresponds to the naming of '$GOPATH/pkg' directory
2017-04-04 19:29:59 -04:00
Unknwon 3b49a99b60
wiki: fix crash with blob name contains tab (#3916) 2017-02-16 11:47:54 -05:00
Unknwon a2dd9ec2e1
models/org_team: panic when team num_repos is negative (#3671) 2017-02-08 18:13:46 -05:00
Unknwon c17f93e6c0
Makefile: remove -buildmode=pie 2017-01-30 15:28:42 -05:00
Unknwon a5afa37203
Makefile: fix string concatenation 2017-01-30 15:24:31 -05:00
Aaron Wood 263203ec28 Produce a position independent executable (#4011)
* Produce a position independent executable

* Add OS detection to the main Makefile so we don't apply -pie on OS X
2017-01-28 17:16:34 -05:00
Sandro Santilli 47a3243ff1 Add all, check and dist Makefile rules (#3549)
These are to follow the GNU Coding Standards Makefile Targets:
https://www.gnu.org/prep/standards/html_node/Standard-Targets.html
2016-08-30 14:06:05 -07:00
Unknwon f70343660d Little code refactoring 2016-08-09 12:56:00 -07:00
Unknwon 08c976f811 Only do go vet on this codebase 2016-08-06 11:20:10 -07:00
Unknwon cf6d321991 Ignore repository with issue disabled or use external tracker in dashboard issues 2016-08-05 12:46:26 -07:00
Unknwon 899e799459 #1601 support delete issue comment 2016-07-26 02:48:17 +08:00
Dan McGregor db3905c0a3 Make go's build flags a variable
This allows the user to specify build flags from the make command
line. For example to force a complete rebuild one could use:

make BUILD_FLAGS='-v -a' TAGS="sqlite"
2016-03-15 07:55:06 -06:00
Unknwon 58f0c68151 Some minor changes 2016-03-06 16:40:04 -05:00
Unknwon 58e004f7da Remove cache avatar support and add its tests 2016-02-14 23:14:55 -05:00
Unknwon a1d97e8f5c Minor fix for #2567 2016-02-14 20:07:42 -05:00
Andrey Nering b8d0367a6c Add command to run the test suite in Makefile. 2016-01-16 16:13:54 -02:00
Unknwon db719abff2 stop compile bindata for TRANSLATORS
- update required version of git-module for #2373
2016-01-11 15:01:38 +08:00
Unknwon a49af93faf #1692 APIs: Users Followers
- User profile un/follow
- List user's followers/following
2015-12-21 04:24:11 -08:00
Adam Strzelecki eb6c634475 Makefile: Do not fail build on missing lessc
This is achieved by adding public/css/gogs.css to special .IGNORE target, which
makes inability to generate/update gogs.css non-fatal and not stopping whole
build process. User is still notified about missing lessc command though, since
inability to update CSS may lead to potential problems:

    lessc public/less/gogs.less public/css/gogs.css
    make: lessc: No such file or directory
    make: [public/css/gogs.css] Error 1 (ignored)

More info at:

  https://www.gnu.org/software/make/manual/html_node/Special-Targets.html
2015-12-09 13:32:43 +01:00
Adam Strzelecki 19e8ce0354 Makefile: Remove trailing whitespace & add last LF
This is pure cleanup commit.
2015-12-01 22:20:21 +01:00
Adam Strzelecki f907a5c98b Makefile: Auto-build CSS & bin-data when necessary
This will ensure that running `make` we will get all necessary files built and
we do not need manually remember to rebuild them.
2015-12-01 22:18:30 +01:00
Adam Strzelecki da607c611d Makefile: Copy installed binary instead 2nd build
This speeds up single build/rebuild rather than install & build which compiles
everything twice, we just copy installed binary back to the project root.
2015-12-01 22:16:00 +01:00
Unknwon b55499d039 go vet and fix #1890 2015-11-08 14:31:49 -05:00
Unknwon a374751eb8 add Makefile 2015-11-03 12:16:43 -05:00