Skip to content

BUG: env vars & variant configs not set in (staging) build scripts? #2587

Description

@h-vetinari

The docs for "Default environment variables set during the build process" say

`PKG_VERSION`
: The version of the package currently under construction.

but in a v1 translation I'm doing (including staging builds, if that's relevant), previously working code

for /f "tokens=1 delims=." %%a in ("%PKG_VERSION%") do (
  set "MAJOR_VERSION=%%a"
)

now evaluates as

for /F "tokens=1 delims=." %a in ("") do (set "MAJOR_VERSION=%a" ) 

in rattler-build - note the empty ("").

Not sure how many other default env vars might be affected.

Same effect on unix;

MAJOR_VERSION=$(echo ${PKG_VERSION} | cut -f1 -d".")

now evaluates as

 │ │ ++ echo
 │ │ ++ cut -f1 -d.
 │ │ + MAJOR_VERSION=

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions