forked from textmate/textmate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal-orig.rave
46 lines (37 loc) · 1.89 KB
/
local-orig.rave
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# ninja TextMate/release/bump && ninja TextMate/release/deploy
set CS_IDENTITY "${APPLE_DEVELOPER_ID}"
add IB_FLAGS "--minimum-deployment-target=${APP_MIN_OS}"
add FLAGS "-I${HOME}/.nix-profile/include"
extend pretty_plist {
config release {
define install "/bin/cp -Xp '${executable}' '${HOME}/bin/pp'"
}
}
config debug {
capture BUILD_ARCH "uname -m"
add LN_FLAGS "-L${HOME}/.nix-profile/sdk/${BUILD_ARCH}/lib"
}
config release {
arch "arm64" "x86_64" {
add FLAGS "-target macos-${arch}"
add LN_FLAGS "-target macos-${arch}"
add LN_FLAGS "-L${HOME}/.nix-profile/sdk/${arch}/lib"
}
}
extend TextMate {
config release {
notarize "${APPLE_NOTARIZE_USER}" "${APPLE_NOTARIZE_PASS}" "com.macromates.${target}"
set changes "${TEXTMATE_CHANGES}"
set version "${TEXTMATE_VERSION}"
set keyfile "${HOME}/.local/share/private/sign-textmate.key"
define next "{ bin/update_changes -di '${changes}' && mate -wl7 '${changes}'; }"
define bump "git commit -vem\"Checkin release notes for $(< ${next})\" '${changes}'"
define tbz "/usr/bin/tar -f /dev/stdout --disable-copyfile --use-compress-prog=pbzip2 -cC '${application}' --strip-components=1 .."
define mdown "bin/extract_changes -v'${version}' '${changes}'"
define tag "git tag --cleanup=whitespace -F'${mdown}' 'v${version}' && printf 'v${version}'"
define plain "sed 's/^## //' '${mdown}'"
define upload "git push origin $(< '${tag}') && hub >&2 release create --prerelease -a'${tbz}' -F'${plain}' $(< '${tag}') && hub release show --format '%as' $(< '${tag}')|cut -f1|tr -d '\\n'"
define sign "pass Keys/sign-textmate.key|openssl dgst -dss1 -passin stdin -sign '${keyfile}' '${tbz}'|openssl enc -base64|tr -d '\\n'"
define deploy "curl -sfn -Furl='<${upload}' -Fsignature='<${sign}' -Fname='${target}' -Fversion='${version}' -Fdepends='os (>= ${APP_MIN_OS}), app (>= 2.0-alpha)' 'https://api.textmate.org/releases'"
}
}