Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add scripts option(custom commands) #373

Merged
merged 1 commit into from
Mar 16, 2017
Merged

add scripts option(custom commands) #373

merged 1 commit into from
Mar 16, 2017

Conversation

sergeylanzman
Copy link
Collaborator

example to use:

  1. Go test with custom params or other test framework like ginkgo
  2. Fronted tools like grunt
  3. Other custom commands(build,deploy etc)

config in Beefile
like command name: command

scripts:
    test: APP_ENV=test APP_CONF_PATH=$(pwd)/conf go test  -v -cover  $(go list ./... | grep -v /vendor/)

This automatic add to commands
screen shot 2017-03-11 at 12 18 11

know issue not support windows(TODO), not test on linux

Thank for @BorisBorshevsky about idea:)

example to use:
1. Go test with custom params or other test framework like ginkgo
2. Fronted tools like grunt
3. Other custom  commands
@astaxie
Copy link
Member

astaxie commented Mar 12, 2017

the script maybe we can rename it to hook?

@astaxie
Copy link
Member

astaxie commented Mar 12, 2017

it looks like the makefile's target. I like the idea.

@BorisBorshevsky
Copy link
Contributor

Hi, it seems the same as in package.json (npm), the call it scripts there.

Copy link
Collaborator

@amrfaissal amrfaissal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice idea, but I don't like the way scripts are added as commands dynamically. I prefer to have an additional run-script command that will load the defined scripts from Beefile and run them by name. For example: $ bee run-script test

@sergeylanzman
Copy link
Collaborator Author

@astaxie @amrfaissal bee run-script XXX is very long. Better way get for user set command as bee command, is very clear and very easy.

@BorisBorshevsky
Copy link
Contributor

BorisBorshevsky commented Mar 14, 2017

seems that this feature is inspired by npm scripts.
maybe it is a good idea to do both.
see npm spec: https://docs.npmjs.com/cli/run-script

npm run-script <command> [-- <args>...]
alias: npm run

@sergeylanzman @amrfaissal

@sergeylanzman
Copy link
Collaborator Author

lets done this issue.
We have nice idea about scripts/hook/custom command.
We have this PR work and #377 (same idea, same implementation, but with color).
@astaxie Your decision what we do with it?

@astaxie
Copy link
Member

astaxie commented Mar 16, 2017

@sergeylanzman For this PR I think we need to avoid the custom command to overwrite the current command, bee run, bee new etc.

@astaxie astaxie merged commit fd4772f into beego:develop Mar 16, 2017
@astaxie
Copy link
Member

astaxie commented Mar 16, 2017

Just have a conversation with @sergeylanzman in slack. We agree that current implement is good enough to deliver. I think we all agree with this idea.

@amrfaissal I think #377 also can merge into. But I like more short name for it. maybe bee cmd or bee rs

@astaxie
Copy link
Member

astaxie commented Mar 16, 2017

@amrfaissal I just think about these two solution. support own command and just use the bee run-script command. I think this solution would be more flexible.

@amrfaissal
Copy link
Collaborator

@astaxie At least "user-defined" commands should be separated from bee's default commands. Adding commands dynamically is a hack that is both flexible and confusing.
I suggest to create a different slice of commands just for scripts, create a new section called "AVAILABLE SCRIPTS"...etc

@astaxie
Copy link
Member

astaxie commented Mar 17, 2017

create a new section called "AVAILABLE SCRIPTS"...etc

Yea, that would make more sense. @sergeylanzman Could you help to create another PR to improve it?

@sergeylanzman
Copy link
Collaborator Author

@astaxie yes create this.
We talk about
Beefile settings:

scripts:
    test: ...
    deploy: ...

command for run this bee cmd deploy or bee cmd test
and need create view for this in console maybe with bee cmd print all custom command
Do you want to add something?
I don't know about command in windows, need add in future support windows. Maybe open issue about this.

@astaxie
Copy link
Member

astaxie commented Mar 17, 2017

Beefile settings:

scripts:
test: ...
deploy: ...
command for run this bee cmd deploy or bee cmd test
and need create view for this in console maybe with bee cmd print all custom command
Do you want to add something?

I agree with this idea. @amrfaissal what's your opinion?

I don't know about command in windows, need add in future support windows. Maybe open issue about this.

I have a window VM. please create a issue for me to track it

Baihhh pushed a commit to Baihhh/bee that referenced this pull request Jul 5, 2023
1. add nonce parameter.
2. add sub in userinfo endpoint.

Signed-off-by: 0x2a <stevesough@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants