Skip to content

Conversation

@liruohrh
Copy link
Contributor

@liruohrh liruohrh commented Dec 7, 2025

use ./answer build -c answer.build.yaml .

# use buildDir or buildAbsDir
buildDir: "../answer-builds/build"
#buildAbsDir: ""
# default new_answer
outputPath: "new_answer"
# default the github repository
answerModule: "./"
plugins:
  - "github.com/apache/answer-plugins/connector-basic@latest"
  - "github.com/apache/answer-plugins/reviewer-basic@latest"
  - "github.com/apache/answer-plugins/captcha-basic@latest"
  - "github.com/apache/answer-plugins/quick-links@latest"
# if you want to reserve product, default is delete it
reserveBuild: true

but not

ANSWER_MODUL=xxx   ./answer build  -b ../answer-builds/build  -o new_answer \
-w github.com/apache/answer-plugins/connector-basic@latest \
-w github.com/apache/answer-plugins/reviewer-basic@latest \
-w github.com/apache/answer-plugins/captcha-basic@latest \
-w github.com/apache/answer-plugins/quick-links@latest

add new option

buildAbsDir: use abs path

reserveBuild: reserve the temp build dir

@LinkinStars
Copy link
Member

We believe using a YAML file for packaging configuration is overly cumbersome. Typically, packaging plugins fall into two scenarios. In most cases, Docker is used for packaging with plugins. The scenario you describe only arises when using binary packaging. If we use binary packaging and frequently package plugins, we typically write a shell script to automate this process. Functionally, creating such a shell script achieves the same result as your configuration file. Therefore, we likely don't need to configure packaging parameters via a YAML file, thereby avoiding increased maintenance overhead.

However, we believe reserveBuild is a good option. You can submit a separate PR for this feature if you'd like. It could be named retainBuildByproduct.

@liruohrh
Copy link
Contributor Author

I think this is quite helpful for cross-platform.
such as go-task use go-sh,
or like use mage (go-make).
use go first instead of shell, Unless the shell is necessary.
I work on windows.

If you still think it's not so good, please reply or directly close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants