Skip to content

Escape @-sign in job template.#426

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

Escape @-sign in job template.#426
nuclearsandwich merged 1 commit intomasterfrom
imperial-at-at

Conversation

@nuclearsandwich
Copy link
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
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
Copy link
Contributor

brawner commented Apr 9, 2020

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