20 Commits

Author SHA1 Message Date
appleboy 8dfbb92314 build: refactor Makefile to enhance usability and add cross-compilation
- Add help descriptions to Makefile targets using double hashes, improving 'make help' documentation
- Implement a 'help' target to print available Makefile commands and their descriptions
- Add explicit .PHONY lines for all make targets to clarify intent
- Add linux/amd64, linux/arm64, and linux/arm build targets for cross-compilation
- Improve test, lint, fmt, install, build, and clean target implementations
- Add clean target to remove build artifacts and coverage files
- Add version target to print current project version

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-12-06 18:31:26 +08:00
appleboy b0761290c2 docs: document project and enforce style with lint targets
- Add a CLAUDE.md guide describing project purpose, build instructions, architecture, and developer patterns
- Add linting and formatting targets (lint, fmt) to Makefile using golangci-lint

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-12-06 18:27:45 +08:00
Bo-Yi Wu 3d7ffaed68 build: ensure Go build/install uses explicit current directory
- Add explicit current directory (.) to Go build and install commands to ensure correct build context

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2025-12-01 17:25:51 +08:00
Bo-Yi Wu 52abef124e refactor: improve CLI robustness and Jenkins integration
- Add missing .PHONY targets to the Makefile for better build reliability
- Ensure HTTP response bodies are always read and closed in Jenkins post requests
- Replace custom response parsing with direct JSON unmarshalling in Jenkins post
- Set a default value for the Version variable
- Move ASCII art to a constant and reuse for CLI help template
- Improve dotenv loading error handling and logging in main
- Update repository link in CLI help output
- Add validation for required CLI parameters and authentication in run function

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2025-12-01 17:23:52 +08:00
Bo-Yi Wu 3eb2242053 chore: migrate CLI to urfave/cli/v2 and update flag handling
- Remove formatting and vetting targets from the Makefile
- Upgrade urfave/cli dependency from v1 to v2
- Update CLI flag definitions to use urfave/cli/v2 API, including new struct field names and flag aliasing
- Add indirect dependency on github.com/xrash/smetrics

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2025-12-01 16:27:57 +08:00
appleboy f932a0ef24 build: refactor build system and update formatting tools
- Change `GOFMT` tool from `gofmt` to `gofumpt`
- Remove DockerHub deployment configurations
- Add detection and setup for Go environment variables
- Add conditional flags and executable naming based on OS
- Update `fmt` and `fmt-check` targets to use `gofumpt`
- Remove `lint`, `misspell-check`, and `misspell` targets
- Update `test` target to remove dependency on `fmt-check`
- Change `install` and `build` targets to use `GOFILES` instead of `SOURCES`
- Update `$(EXECUTABLE)` target to output to `bin/`
- Remove various `release` and `docker` related targets

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-10-04 15:21:32 +08:00
Bo-Yi Wu 685cc312e3 chore(makefile): remove GOPACKAGE variable 2020-02-01 17:58:28 +08:00
Bo-Yi Wu 6ca333982b add arch
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-09-30 11:27:34 +08:00
Bo-Yi Wu 7b357075fe add arch
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-09-30 11:24:02 +08:00
Bo-Yi Wu ded8530d8e chore(docker): upgrade drone and dockerfile 2019-03-01 08:53:17 +08:00
Bo-Yi Wu 0af129e9d8 feat(ddocker): support arm and i386 version 2018-11-11 11:08:44 +08:00
Bo-Yi Wu 4d3054d832 add empty line.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-05-08 14:05:01 +08:00
Bo-Yi Wu 18b163fd7b add fmt check command (#18)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-05-07 12:52:57 +08:00
Bo-Yi Wu 042c5d632c upgrade drone config (#17)
* upgrade drone config

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* remove glide config

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-05-06 23:31:30 +08:00
Bo-Yi Wu 6e58cda4fe feat: Add unconvert command 2017-01-28 11:47:12 +08:00
Bo-Yi Wu e07592691c fix: Enforce custom LDFLAGS within makefile 2017-01-17 10:35:58 +08:00
Bo-Yi Wu 7275c0c66b feat: replace jenkins with drone (#7) 2017-01-16 11:55:28 +08:00
Bo-Yi Wu 4917613ed8 add version command.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-11-19 21:19:38 +08:00
Bo-Yi Wu 92fd06c78a Add plugin testing.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-15 23:44:11 +08:00
Bo-Yi Wu 74735d5fa4 initial file
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-15 13:30:34 +08:00