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

Update to latest bootstrapper. #6

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Update to latest bootstrapper. #6

wants to merge 1 commit into from

Conversation

nikhilagrawaldotnet
Copy link

@nikhilagrawaldotnet nikhilagrawaldotnet commented May 28, 2018

This PR brings MR upto speed with latest bootstrapper. Additional params have been added as separate controls with default values.

@gep13 Resolved issues #4 #2 #5

@a-t-k
Copy link

a-t-k commented Feb 12, 2021

Hey.
Can you please insert distinction for the new Cake V1.0.0 when you execute cake.exe?
Target parameter need in the new version double dash

old: -target=foo
new; --target=foo

tx

@nikhilagrawaldotnet
Copy link
Author

nikhilagrawaldotnet commented Jul 22, 2021

@a-t-k: PR #9 fixes that.

@gep13: Can you approve and merge this and then #9 pls. (In this order).

Copy link
Member

@nils-a nils-a left a comment

Choose a reason for hiding this comment

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

@nikhilagrawaldotnet When I try this version I get the following errors:

[13:54:00]At C:\TeamCity\buildAgent\temp\buildTmp\powershell3334180761526035403.ps1:8 char:27
[13:54:00]+     [bool]$ShowDescription = false,
[13:54:00]+                           ~
[13:54:00]Missing ')' in function parameter list.
[13:54:00]At C:\TeamCity\buildAgent\temp\buildTmp\powershell3334180761526035403.ps1:8 char:35
[13:54:00]+     [bool]$ShowDescription = false,
[13:54:00]+                                   ~
[13:54:00]Missing argument in parameter list.
[13:54:00]At C:\TeamCity\buildAgent\temp\buildTmp\powershell3334180761526035403.ps1:10 char:26
[13:54:00]+     [bool]$DryRun = false,
[13:54:00]+                          ~
[13:54:00]Missing argument in parameter list.
[13:54:00]At C:\TeamCity\buildAgent\temp\buildTmp\powershell3334180761526035403.ps1:15 char:1
[13:54:00]+ )
[13:54:00]+ ~
[13:54:00]Unexpected token ')' in expression or statement.
[13:54:00]    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
[13:54:00]    + FullyQualifiedErrorId : MissingExpressionAfterToken
[13:54:00] 
[13:54:00]Process exited with code 1

I added two suggestions that fixed the error for me.

[string]$Configuration = "%mr.Cake.configuration%",
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
[string]$Verbosity = "%mr.Cake.verbosity%",
[bool]$ShowDescription = %mr.Cake.showdescription%,
Copy link
Member

Choose a reason for hiding this comment

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

This line raises an error on usage.

Suggested change
[bool]$ShowDescription = %mr.Cake.showdescription%,
[bool]$ShowDescription = $%mr.Cake.showdescription%,

[string]$Verbosity = "%mr.Cake.verbosity%",
[bool]$ShowDescription = %mr.Cake.showdescription%,
[Alias("WhatIf", "Noop")]
[bool]$DryRun = %mr.Cake.dryrun%,
Copy link
Member

Choose a reason for hiding this comment

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

this line raises an error on usage.

Suggested change
[bool]$DryRun = %mr.Cake.dryrun%,
[bool]$DryRun = $%mr.Cake.dryrun%,

@nils-a
Copy link
Member

nils-a commented Jul 28, 2021

Also, it seems that you simply updated to the latest bootstrapper without modifying it. This will break existing builds, as the the tools folder is no longer used from the correct location.

The old script contained:

$repositoryPath = "%teamcity.build.workingDir%";
$toolsPath = Join-Path $repositoryPath "tools";

and worked its way from there.

The new one contains:

$TOOLS_DIR = Join-Path $PSScriptRoot "tools"

This folder (i.e. $PSScriptRoot) - for Meta Runners - seems to be some temp folder in the agent installation folder and not the workingDir of the build.

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