Ver código fonte

Taskfile: add desc to each task (#6304)

ᴜɴᴋɴᴡᴏɴ 4 anos atrás
pai
commit
a533e8fb52
2 arquivos alterados com 12 adições e 2 exclusões
  1. 10 0
      Taskfile.yml
  2. 2 2
      docs/dev/import_locale.md

+ 10 - 0
Taskfile.yml

@@ -2,6 +2,7 @@ version: '3'
 
 tasks:
   web:
+    desc: Build the binary and start the web server.
     deps: [build]
     cmds:
       - ./gogs web
@@ -10,6 +11,7 @@ tasks:
       - internal/**/*.go
 
   build:
+    desc: Build the binary.
     cmds:
       - go build -v
         -ldflags '
@@ -26,6 +28,7 @@ tasks:
         sh: git rev-parse HEAD
 
   generate:
+    desc: Generate bindata for all assets.
     deps: [clean]
     cmds:
       - go generate internal/assets/conf/conf.go
@@ -33,14 +36,17 @@ tasks:
       - go generate internal/assets/public/public.go
 
   test:
+    desc: Run all tests.
     cmds:
       - go test -cover -race ./...
 
   clean:
+    desc: Cleans up system meta files for code generation.
     cmds:
       - find . -name "*.DS_Store" -type f -delete
 
   release:
+    desc: Build the binary and pack resources to a ZIP file.
     deps: [build]
     cmds:
       - rm -rf {{.RELEASE_GOGS}}
@@ -52,17 +58,21 @@ tasks:
       RELEASE_GOGS: release/gogs
 
   less:
+    desc: Generate CSS from LESS files.
     cmds:
       - lessc --clean-css --source-map "public/less/gogs.less" public/css/gogs.min.css
 
   fixme:
+    desc: Show all occurrences of "FIXME".
     cmds:
       - grep -rnw "FIXME" internal
 
   todo:
+    desc: Show all occurrences of "TODO".
     cmds:
       - grep -rnw "TODO" internal
 
   legacy:
+    desc: Identify legacy and deprecated lines.
     cmds:
       - grep -rnw "\(LEGACY\|Deprecated\)" internal

+ 2 - 2
docs/dev/import_locale.md

@@ -9,8 +9,8 @@
     Locale files has been successfully imported!
     ```
 
-1. Run `make generate` to generate corresponding bindata.
-1. Run `./gogs web` to start the web server, then visit the site in browser to make sure nothing blows up.
+1. Run `task generate` to generate corresponding bindata.
+1. Run `task web` to start the web server, then visit the site in the browser to make sure nothing blows up.
 1. Check out a new branch using `git checkout -b update-locales`.
 1. Stash changes then run `git commit -m "locale: sync from Crowdin"`.
 1. Push the commit then open up a pull request on GitHub.