Skip to content

Commit

Permalink
fix(mas)
Browse files Browse the repository at this point in the history
 closes #8311
  • Loading branch information
jhheider committed Jan 4, 2025
1 parent 95a80e7 commit 77cbdcb
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions projects/github.com/mas-cli/mas/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,29 @@ platforms:
- darwin

build:
- run:
mv $PROP Sources/mas/Package.swift
- run: zsh $PROP >Package.swift
working-directory: Sources/mas/Utilities
prop: |
#!/bin/zsh
SWIFT_VERSION="$(printf %s "${${$(swift --version 2>/dev/null)#Apple Swift version }%%$'\n'*}")"
SWIFT_DRIVER_VERSION="$(printf %s "${${$((swift --version 3>&2 2>&1 1>&3) 2>/dev/null)#swift-driver version: }% }")"
cat <<EOF
/// Generated by brewkit
enum Package {
static let version = "{{version}}"
static let installMethod = "pkgx"
static let gitOrigin = "https://github.com/mas-cli/mas.git"
static let gitRevision = "pkgx"
static let swiftVersion = "$SWIFT_VERSION"
static let swiftDriverVersion = "$SWIFT_DRIVER_VERSION"
}
EOF
- swift build --configuration release
- install -D .build/release/mas {{prefix}}/bin/mas

provides:
- bin/mas

test:
test "$(mas version)" = {{version}}
test: test "$(mas version)" = {{version}}

0 comments on commit 77cbdcb

Please sign in to comment.