Skip to content

Commit

Permalink
Merge pull request #1057 from jonjohnsonjr/cross-triplet-rust
Browse files Browse the repository at this point in the history
Add ${{cross.triplet.rust.[glibc,musl]}}
  • Loading branch information
imjasonh authored Mar 2, 2024
2 parents 0b257b0 + a1f2348 commit 0eb18bd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
2 changes: 2 additions & 0 deletions pkg/build/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ func substitutionMap(pb *PipelineBuild) (map[string]string, error) {
nw[config.SubstitutionHostTripletRust] = pb.Build.BuildTripletRust()
nw[config.SubstitutionCrossTripletGnuGlibc] = pb.Build.Arch.ToTriplet("gnu")
nw[config.SubstitutionCrossTripletGnuMusl] = pb.Build.Arch.ToTriplet("musl")
nw[config.SubstitutionCrossTripletRustGlibc] = pb.Build.Arch.ToRustTriplet("gnu")
nw[config.SubstitutionCrossTripletRustMusl] = pb.Build.Arch.ToRustTriplet("musl")
nw[config.SubstitutionBuildArch] = pb.Build.Arch.ToAPK()
}

Expand Down
28 changes: 15 additions & 13 deletions pkg/config/vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,21 @@ import (
)

const (
SubstitutionPackageName = "${{package.name}}"
SubstitutionPackageVersion = "${{package.version}}"
SubstitutionPackageFullVersion = "${{package.full-version}}"
SubstitutionPackageEpoch = "${{package.epoch}}"
SubstitutionPackageDescription = "${{package.description}}"
SubstitutionTargetsDestdir = "${{targets.destdir}}"
SubstitutionTargetsContextdir = "${{targets.contextdir}}"
SubstitutionSubPkgDir = "${{targets.subpkgdir}}"
SubstitutionHostTripletGnu = "${{host.triplet.gnu}}"
SubstitutionHostTripletRust = "${{host.triplet.rust}}"
SubstitutionCrossTripletGnuGlibc = "${{cross.triplet.gnu.glibc}}"
SubstitutionCrossTripletGnuMusl = "${{cross.triplet.gnu.musl}}"
SubstitutionBuildArch = "${{build.arch}}"
SubstitutionPackageName = "${{package.name}}"
SubstitutionPackageVersion = "${{package.version}}"
SubstitutionPackageFullVersion = "${{package.full-version}}"
SubstitutionPackageEpoch = "${{package.epoch}}"
SubstitutionPackageDescription = "${{package.description}}"
SubstitutionTargetsDestdir = "${{targets.destdir}}"
SubstitutionTargetsContextdir = "${{targets.contextdir}}"
SubstitutionSubPkgDir = "${{targets.subpkgdir}}"
SubstitutionHostTripletGnu = "${{host.triplet.gnu}}"
SubstitutionHostTripletRust = "${{host.triplet.rust}}"
SubstitutionCrossTripletGnuGlibc = "${{cross.triplet.gnu.glibc}}"
SubstitutionCrossTripletGnuMusl = "${{cross.triplet.gnu.musl}}"
SubstitutionCrossTripletRustGlibc = "${{cross.triplet.rust.glibc}}"
SubstitutionCrossTripletRustMusl = "${{cross.triplet.rust.musl}}"
SubstitutionBuildArch = "${{build.arch}}"
)

// Get variables from configuration and return them in a map
Expand Down

0 comments on commit 0eb18bd

Please sign in to comment.