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

feat: add scaffold command #926

Merged
merged 14 commits into from
Jun 25, 2022
Merged

feat: add scaffold command #926

merged 14 commits into from
Jun 25, 2022

Conversation

suzuki-shunsuke
Copy link
Member

@suzuki-shunsuke suzuki-shunsuke commented Jun 25, 2022

#922

$ aqua help gr
NAME:
   aqua generate-registry - Generate a registry's package configuration

USAGE:
   aqua generate-registry <package name>

DESCRIPTION:
   Generate a template of Registry package configuration.
   
   Note that you probably fix the generate code manually.
   The generate code is not perfect and may include the wrong configuration.
   It is just a template.
   
   e.g.
   
   $ aqua gr cli/cli # Outputs the configuration.
   packages:
     - type: github_release
       repo_owner: cli
       repo_name: cli
       asset: gh_{{trimV .Version}}_{{.OS}}_{{.Arch}}.{{Format}}
       format: tar.gz
       description: GitHub’s official command line tool
       replacements:
         darwin: macOS
       overrides:
         - goos: windows
           format: zip
       supported_envs:
         - darwin
         - linux
         - amd64
       rosetta2: true

e.g.

$ aqua gr cli/cli
packages:
  - type: github_release
    repo_owner: cli
    repo_name: cli
    asset: gh_{{trimV .Version}}_{{.OS}}_{{.Arch}}.{{Format}}
    format: tar.gz
    description: GitHub’s official command line tool
    replacements:
      darwin: macOS
    overrides:
      - goos: windows
        format: zip
    supported_envs:
      - darwin
      - linux
      - amd64
    rosetta2: true

⚠️ Future work

I tried to implement the insert option -i, but it doesn't work well.

@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Jun 25, 2022
pkg/controller/scaffold/scaffold.go Outdated Show resolved Hide resolved
pkg/controller/scaffold/scaffold.go Outdated Show resolved Hide resolved
pkg/controller/scaffold/scaffold.go Outdated Show resolved Hide resolved
pkg/controller/scaffold/scaffold.go Outdated Show resolved Hide resolved
pkg/controller/scaffold/scaffold.go Outdated Show resolved Hide resolved
pkg/controller/scaffold/scaffold.go Outdated Show resolved Hide resolved
pkg/controller/scaffold/scaffold.go Outdated Show resolved Hide resolved
pkg/controller/scaffold/scaffold.go Outdated Show resolved Hide resolved
pkg/controller/scaffold/scaffold.go Outdated Show resolved Hide resolved
pkg/github/github.go Outdated Show resolved Hide resolved
@suzuki-shunsuke suzuki-shunsuke marked this pull request as ready for review June 25, 2022 05:58
@suzuki-shunsuke suzuki-shunsuke added this to the v1.13.1 milestone Jun 25, 2022
@suzuki-shunsuke suzuki-shunsuke merged commit 95473b3 into main Jun 25, 2022
@suzuki-shunsuke suzuki-shunsuke deleted the feat/scaffold branch June 25, 2022 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant