Skip to content

Commit

Permalink
feat: add project.srcdir variable (#1666)
Browse files Browse the repository at this point in the history
  • Loading branch information
wojciechka authored Nov 27, 2024
1 parent 736a91d commit a7083d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/build/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ func NewSubstitutionMap(cfg *config.Configuration, arch apko_types.Architecture,
config.SubstitutionPackageVersion: pkg.Version,
config.SubstitutionPackageEpoch: strconv.FormatUint(pkg.Epoch, 10),
config.SubstitutionPackageFullVersion: fmt.Sprintf("%s-r%s", config.SubstitutionPackageVersion, config.SubstitutionPackageEpoch),
config.SubstitutionPackageSrcdir: "/home/build",
config.SubstitutionTargetsOutdir: "/home/build/melange-out",
config.SubstitutionTargetsDestdir: fmt.Sprintf("/home/build/melange-out/%s", pkg.Name),
config.SubstitutionTargetsContextdir: fmt.Sprintf("/home/build/melange-out/%s", pkg.Name),
Expand Down
1 change: 1 addition & 0 deletions pkg/config/vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const (
SubstitutionPackageFullVersion = "${{package.full-version}}"
SubstitutionPackageEpoch = "${{package.epoch}}"
SubstitutionPackageDescription = "${{package.description}}"
SubstitutionPackageSrcdir = "${{package.srcdir}}"
SubstitutionTargetsOutdir = "${{targets.outdir}}"
SubstitutionTargetsDestdir = "${{targets.destdir}}"
SubstitutionTargetsContextdir = "${{targets.contextdir}}"
Expand Down

0 comments on commit a7083d9

Please sign in to comment.