-
Notifications
You must be signed in to change notification settings - Fork 50
feat: add Paket #5483
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
base: main
Are you sure you want to change the base?
feat: add Paket #5483
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,34 @@ | ||||
| import { join } from 'node:path'; | ||||
| import { execa } from 'execa'; | ||||
| import { injectFromHierarchy, injectable } from 'inversify'; | ||||
| import { BaseInstallService } from '../../install-tool/base-install.service'; | ||||
|
|
||||
| @injectable() | ||||
| @injectFromHierarchy() | ||||
| export class PaketInstallService extends BaseInstallService { | ||||
| readonly name = 'paket'; | ||||
|
|
||||
| override async install(version: string): Promise<void> { | ||||
| const toolPath = this.pathSvc.toolPath(this.name); | ||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. base/src/cli/tools/node/index.ts Line 109 in ddf128d
|
||||
|
|
||||
| const dotnet = join(this.pathSvc.toolPath('dotnet'), 'dotnet'); | ||||
| await execa(dotnet, [ | ||||
| 'tool', | ||||
| 'install', | ||||
| '--tool-path', | ||||
| toolPath, | ||||
| this.name, | ||||
| '--version', | ||||
| version, | ||||
| ]); | ||||
| } | ||||
|
|
||||
| override async link(_version: string): Promise<void> { | ||||
| const src = this.pathSvc.toolPath(this.name); | ||||
| await this.shellwrapper({ srcDir: src, extraToolEnvs: ['dotnet'] }); | ||||
| } | ||||
|
|
||||
| override async test(_version: string): Promise<void> { | ||||
| await execa(this.name, ['--version'], { stdio: ['inherit', 'inherit', 1] }); | ||||
| } | ||||
| } | ||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,7 @@ export const NoPrepareTools = [ | |
| 'maven', | ||
| 'nix', | ||
| 'npm', | ||
| 'paket', | ||
| 'pdm', | ||
| 'pip-tools', | ||
| 'pipenv', | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -129,6 +129,19 @@ RUN set -ex; \ | |||||
| dotnet add package Newtonsoft.Json --version 12.0.3; \ | ||||||
| dotnet restore --force-evaluate | ||||||
|
|
||||||
| #-------------------------------------- | ||||||
| # test: paket | ||||||
| #-------------------------------------- | ||||||
| FROM build AS test-others | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| # renovate: datasource=nuget packageName=Paket | ||||||
| RUN install-tool paket 9.0.2 | ||||||
|
|
||||||
| WORKDIR /test | ||||||
| RUN set -ex; \ | ||||||
| ls -la; env; \ | ||||||
| paket init | ||||||
|
|
||||||
| #-------------------------------------- | ||||||
| # final | ||||||
| #-------------------------------------- | ||||||
|
|
@@ -138,3 +151,4 @@ COPY --from=testa /.dummy /.dummy | |||||
| COPY --from=testb /.dummy /.dummy | ||||||
| COPY --from=testc /.dummy /.dummy | ||||||
| COPY --from=testd /.dummy /.dummy | ||||||
| COPY --from=test-others /.dummy /.dummy | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -40,9 +40,26 @@ FROM base AS test-dotnet | |||||
| # renovate: datasource=dotnet packageName=dotnet-sdk | ||||||
| RUN install-tool dotnet 10.0.100 | ||||||
|
|
||||||
| #-------------------------------------- | ||||||
| # test: paket | ||||||
| #-------------------------------------- | ||||||
| FROM base AS test-others | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| # renovate: datasource=dotnet packageName=dotnet-sdk | ||||||
| RUN install-tool dotnet 10.0.100 | ||||||
|
|
||||||
| # renovate: datasource=nuget packageName=Paket | ||||||
| RUN install-tool paket 9.0.2 | ||||||
|
|
||||||
| WORKDIR /test | ||||||
| RUN set -ex; \ | ||||||
| ls -la; env; \ | ||||||
| paket init | ||||||
|
|
||||||
| #-------------------------------------- | ||||||
| # Image: final | ||||||
| #-------------------------------------- | ||||||
| FROM base | ||||||
|
|
||||||
| COPY --from=test-dotnet /.dummy /.dummy | ||||||
| COPY --from=test-others /.dummy /.dummy | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add parent, so installer knows it needs dotnet first
base/src/cli/tools/node/utils.ts
Line 69 in ddf128d