Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mas) #8312

Merged
merged 1 commit into from
Jan 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}}
Loading