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 Commands fields in Entrypoint #389

Merged
merged 1 commit into from
Apr 19, 2021
Merged

Conversation

jschwinger233
Copy link
Member

No description provided.

@jschwinger233
Copy link
Member Author

fa, core/types.Entrypoint 直接被 cli 引用, 用来 Unmarshal spec.yaml, 所以 types.Entrypoint 也要做一下字段兼容, 不然旧式的 spec 不能用 cli 解析.

旧式 cmd:

appname: 
entrypoints:
  zc:
    cmd: eru-core --config /etc/eru/core.yaml

新式 cmd:

appname:
entrypoints:
  zc:
    cmd:
    - eru-core
    - --config
    - /etc/eru/core.yaml

@CMGS
Copy link
Contributor

CMGS commented Apr 16, 2021

fa, core/types.Entrypoint 直接被 cli 引用, 用来 Unmarshal spec.yaml, 所以 types.Entrypoint 也要做一下字段兼容, 不然旧式的 spec 不能用 cli 解析.

旧式 cmd:

appname: 
entrypoints:
  zc:
    cmd: eru-core --config /etc/eru/core.yaml

新式 cmd:

appname:
entrypoints:
  zc:
    cmd:
    - eru-core
    - --config
    - /etc/eru/core.yaml

cli 改一下就好了吧- -

@CMGS
Copy link
Contributor

CMGS commented Apr 16, 2021

不过讲道理,也不是每个人都需要 line by line 的那还是兼容吧……你看这个例子,多丑- -

@jschwinger233
Copy link
Member Author

不过讲道理,也不是每个人都需要 line by line 的那还是兼容吧……你看这个例子,多丑- -

嗯, 不过我在 cli 里做兼容吧, core/types.Entrypoint 只有一个字段 Commands []string, 不然太脏了

@CMGS
Copy link
Contributor

CMGS commented Apr 16, 2021 via email

@jschwinger233 jschwinger233 force-pushed the zc/cmd branch 2 times, most recently from 472c56f to 186e397 Compare April 16, 2021 09:27
@jschwinger233 jschwinger233 changed the title [WIP] Add Commands fields in Entrypoint Add Commands fields in Entrypoint Apr 16, 2021
@tonicmuroq
Copy link
Contributor

cli 那个简直是... 是有 bug 的, 现在的

@jschwinger233
Copy link
Member Author

cli 那个简直是... 是有 bug 的, 现在的

你说的 bug, 和我解决的是同一个 bug 吗? https://github.com/projecteru2/cli/pull/64/files

@tonicmuroq
Copy link
Contributor

cli 那个简直是... 是有 bug 的, 现在的

你说的 bug, 和我解决的是同一个 bug 吗? https://github.com/projecteru2/cli/pull/64/files

对的就是这个! 我前天改 lambda 的时候发现了...

@CMGS CMGS merged commit 8729267 into projecteru2:master Apr 19, 2021
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.

3 participants