Skip to content

Escape @-sign in job template. - #426

Merged
nuclearsandwich merged 1 commit into
masterfrom
imperial-at-at
Apr 9, 2020
Merged

nuclearsandwich merged 1 commit into
masterfrom
imperial-at-at

Conversation

@nuclearsandwich

Copy link
Copy Markdown
Member

Otherwise empy tries and fails to substitute the todays_date variable.

Follow-up to #424

Signed-off-by: Steven! Ragnarök steven@nuclearsandwich.com

Otherwise empy tries and fails to substitute the todays_date variable.

Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>
@nuclearsandwich

Copy link
Copy Markdown
Member Author

Example job diff

    <<<
    --- remote config
    +++ new config
    @@ -249,0 +250,3 @@
    +rem "Change dockerfile once per day to invalidate docker caches"
    +powershell "(Get-Content ${Env:DOCKERFILE}).replace('@todays_date', $(Get-Date).ToLongDateString()) | Set-Content ${Env:DOCKERFILE}"
    +
    @@ -253 +256 @@
    -set BUILD_ARGS=--build-arg WINDOWS_RELEASE_ID=%RELEASE_ID% --build-arg TODAYS_DATE="%date%"
    +set BUILD_ARGS=--build-arg WINDOWS_RELEASE_ID=%RELEASE_ID%
    >>>

@brawner

brawner commented Apr 9, 2020

Copy link
Copy Markdown
Contributor

This works, but we can also avoid using @ entirely so empy doesn't get the wrong idea (e.g. TODAYS_DATE)

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.

2 participants