首页 文章

如何按日期列出头盔图版本?

提问于
浏览
1

我正在查看jupyterhub helm repo的掌舵图版本: https://jupyterhub.github.io/helm-chart/index.yaml

当我使用 helm search -l jupyterhub/jupyterhub 时,版本按照它们出现在 index.yaml 中的顺序出现,这不是它们的创建顺序(根据 index.yaml 中的 created 字段)

有没有办法让版本列表按日期排序?

1 回答

  • 2

    从掌舵的角度来看没有 . 但是你可以通过调整输出来获得你想要的东西,尽管 jupyterhub/jupyterhub 例如是 jupyterhub/jupyterhub .

    无论如何,我想出了这个bash / Ruby单线程,但它直接从它上面提取: https://jupyterhub.github.io/helm-chart/index.yaml

    $ curl -s https://jupyterhub.github.io/helm-chart/index.yaml | ruby -ryaml -rjson -rdate -e 'puts YAML.load(ARGF)["entries"]["binderhub"].sort_by {|hsh| hsh["created"] }'
    

相关问题