mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-24 06:12:45 +03:00
Adapt sparkle signing
This commit is contained in:
parent
69211cc0fd
commit
d35d61315d
@ -90,7 +90,6 @@
|
||||
4B19BEFD1E110183007E823C /* preview in Resources */ = {isa = PBXBuildFile; fileRef = 4B19BEFB1E110183007E823C /* preview */; };
|
||||
4B238BE11D3BF24200CBDD98 /* Application.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B238BE01D3BF24200CBDD98 /* Application.swift */; };
|
||||
4B37ADB91D6E471B00970D55 /* vimr in Resources */ = {isa = PBXBuildFile; fileRef = 4B37ADB81D6E471B00970D55 /* vimr */; };
|
||||
4B3AC8941DB031C600AC5823 /* sparkle_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = 4B3AC8931DB031C600AC5823 /* sparkle_pub.pem */; };
|
||||
4B6A70941D60E04200E12030 /* AppKitCommons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B6A70931D60E04200E12030 /* AppKitCommons.swift */; };
|
||||
4B6C6AE3267C71ED00F77527 /* RxCocoa in Frameworks */ = {isa = PBXBuildFile; productRef = 4B6C6AE2267C71ED00F77527 /* RxCocoa */; };
|
||||
4B6C6AE5267C71ED00F77527 /* RxRelay in Frameworks */ = {isa = PBXBuildFile; productRef = 4B6C6AE4267C71ED00F77527 /* RxRelay */; };
|
||||
@ -270,7 +269,6 @@
|
||||
4B238BE01D3BF24200CBDD98 /* Application.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Application.swift; sourceTree = "<group>"; };
|
||||
4B2A2C0D1D0353750074CE9A /* Bridge.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Bridge.h; sourceTree = "<group>"; };
|
||||
4B37ADB81D6E471B00970D55 /* vimr */ = {isa = PBXFileReference; fileEncoding = 1; lastKnownFileType = text.script.python; path = vimr; sourceTree = "<group>"; };
|
||||
4B3AC8931DB031C600AC5823 /* sparkle_pub.pem */ = {isa = PBXFileReference; fileEncoding = 1; lastKnownFileType = text; path = sparkle_pub.pem; sourceTree = "<group>"; };
|
||||
4B6A70931D60E04200E12030 /* AppKitCommons.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppKitCommons.swift; sourceTree = "<group>"; };
|
||||
4B8C64CD23F02259008733D8 /* Dev.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Dev.xcconfig; sourceTree = "<group>"; };
|
||||
4B8C64CE23F022C2008733D8 /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
|
||||
@ -658,7 +656,6 @@
|
||||
4BF07EE61D51326A009BECEB /* Credits.rtf */,
|
||||
4BEBA50F1CFF374B00673FDF /* Info.plist */,
|
||||
4B37ADB81D6E471B00970D55 /* vimr */,
|
||||
4B3AC8931DB031C600AC5823 /* sparkle_pub.pem */,
|
||||
1929BC6D45B7E14D4D75D4E6 /* com.qvacua.VimR.vim */,
|
||||
);
|
||||
name = resources;
|
||||
@ -941,7 +938,6 @@
|
||||
4B19BEFD1E110183007E823C /* preview in Resources */,
|
||||
4B9433EE20B95EC7005807BA /* MacVim-vim.icns in Resources */,
|
||||
4B9433F020B95EC7005807BA /* MacVim-py.icns in Resources */,
|
||||
4B3AC8941DB031C600AC5823 /* sparkle_pub.pem in Resources */,
|
||||
4B9433E620B95EC6005807BA /* MacVim-log.icns in Resources */,
|
||||
4B94340D20B95EC7005807BA /* MacVim-dtd.icns in Resources */,
|
||||
4B9433DF20B95EC6005807BA /* MacVim-lisp.icns in Resources */,
|
||||
|
@ -1277,9 +1277,7 @@
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>VimR.Application</string>
|
||||
<key>SUFeedURL</key>
|
||||
<string>https://raw.githubusercontent.com/qvacua/vimr/master/appcast.xml</string>
|
||||
<key>SUPublicDSAKeyFile</key>
|
||||
<string>sparkle_pub.pem</string>
|
||||
<key>SUPublicEDKey</key>
|
||||
<string>G37CFFnc1dSRxbsuzquapWYKBVaEatiParffxNIvghI=</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -1,36 +0,0 @@
|
||||
-----BEGIN PUBLIC KEY-----
|
||||
MIIGOjCCBC0GByqGSM44BAEwggQgAoICAQD1PIrUkxqwOU1NJKnxntvrogP1pS4U
|
||||
HxBOkIN8x2cH6Mnwhqv82lxlB6tWAXEI63Jo48rxuCUGX6AydnadMP/5i8YheTkK
|
||||
CUsq/d8ERLK2OJPEb2knoJsETCpj7VnGNfnKk3IwtLBjgnseXccErTkeMnXxP0yA
|
||||
3MkwH3Z+gdBFfUoVnl9jcWvXaHDuzn51wGHifHmw3Aqn/MNbWQACNG8r8lkizz2I
|
||||
FMKzCuk90bgHYv0HnKgTUENBYcwNypiYQDWpf1sG0fqQ87VQe/4s2ltAoQr06ZDi
|
||||
IOerfA063VxLhtU9iKGG6UJiK03JytpYa0BiwK7Ey3Ux6eogd+E7Pw1roOFt6X6h
|
||||
IrUhRcM8Rww5Ge7LmX6SYm1KAhJ39mW82dITaGeehaJtAiL0kSQoCVklolUGrYIL
|
||||
1GGi8UNBb6+7A41YeNXeslrAi9FfRt4C89Dk2x7ctCc0FHKb7Cxv8Zo2hms4pn4k
|
||||
/QYLruvfH7qEXOcxgbCaz+WlqXM162i7iqBEwsiHB+wpBPbWCmKxfTE2rwboMxGU
|
||||
WIZDWKA34GQJVvcZnpjNNevYsAClrNoj+imudf5jIsI6YN3TURoB+AfeYJhgJ/o1
|
||||
Pz3glj0siWyBB4IlUKW5F0H4hKP7vvSKmv9SV9QiVQeq2r+1zwXwNhsi8sPeToth
|
||||
aNJdUtARjGOZXQIVAPaxeT2Q22sRAqFR2o4FJdtkcmstAoICABZMONKClyPHmL4X
|
||||
JYUd+12ttOmqzO9YxC4Yp2rh99IDjFk5g0NLecAyvs/CNF5O/DtJKOU6i2YNqpZq
|
||||
QJzHLeORr58VIsIqA1vSU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ZZws5dmEDaM5
|
||||
Dbf+Xb760UXwxFkPcGoLaAUDDQTvKxPnWQvHtHA5TrnB3ue+uuEoE/uVuubojKJH
|
||||
nzPgJJuZA7SYQP74z/kD3TfwUedKphNuLBUHMKJCGUnYiPeFlXxfZbalgYCbOgL0
|
||||
kOXpsjSYCns08sro7SN+PdzuPWrPaD3sGxEDgPU5VlN/xxnLjLjWHOswqHVeDsCP
|
||||
11Yor+MNtwlj+1Lh4q7ocVAIK6Iuq+A98jb07h6c1X5kOfiiTHwS91krzX8pKmvx
|
||||
Mzjkb7bT7mHD4T9q3SQ=
|
||||
-----END PUBLIC KEY-----
|
@ -99,10 +99,10 @@ main() {
|
||||
|
||||
if [[ "${upload}" == true ]]; then
|
||||
upload_artifact
|
||||
fi
|
||||
|
||||
if [[ "${update_appcast}" == true ]]; then
|
||||
update_appcast_file
|
||||
fi
|
||||
if [[ "${update_appcast}" == true ]]; then
|
||||
update_appcast_file
|
||||
fi
|
||||
popd >/dev/null
|
||||
}
|
||||
|
@ -5,19 +5,17 @@
|
||||
|
||||
# We use python of brew due to some pip packages.
|
||||
|
||||
import os
|
||||
import io
|
||||
import sys
|
||||
import subprocess
|
||||
import requests
|
||||
import json
|
||||
import markdown
|
||||
import subprocess
|
||||
import sys
|
||||
from datetime import datetime
|
||||
from string import Template
|
||||
|
||||
SIGN_UPDATE = './bin/sign_update'
|
||||
PRIVATE_KEY_PATH = os.path.expanduser('~/.local/secrets/sparkle_priv.pem')
|
||||
GITHUB_TOKEN_PATH = os.path.expanduser('~/.local/secrets/github.qvacua.release.token')
|
||||
import markdown
|
||||
import requests
|
||||
|
||||
SIGN_UPDATE = './build/SourcePackages/artifacts/sparkle/bin/sign_update'
|
||||
|
||||
file_path = sys.argv[1]
|
||||
bundle_version = sys.argv[2]
|
||||
@ -25,19 +23,13 @@ marketing_version = sys.argv[3]
|
||||
tag_name = sys.argv[4]
|
||||
is_snapshot = True if len(sys.argv) > 5 and sys.argv[5] == "true" else False
|
||||
|
||||
file_size = os.stat(file_path).st_size
|
||||
file_signature = subprocess.check_output([SIGN_UPDATE, file_path, PRIVATE_KEY_PATH]).decode('utf-8').strip()
|
||||
file_signature = subprocess.check_output([SIGN_UPDATE, file_path]).decode('utf-8').strip()
|
||||
|
||||
appcast_template_file = open('resources/appcast_template.xml', 'r')
|
||||
appcast_template = Template(appcast_template_file.read())
|
||||
appcast_template_file.close()
|
||||
|
||||
token_file = open(GITHUB_TOKEN_PATH, 'r')
|
||||
token = token_file.read().strip()
|
||||
token_file.close()
|
||||
|
||||
release_response = requests.get('https://api.github.com/repos/qvacua/vimr/releases/tags/{0}'.format(tag_name),
|
||||
headers={'Authorization': f"token {token}"})
|
||||
release_response = requests.get('https://api.github.com/repos/qvacua/vimr/releases/tags/{0}'.format(tag_name))
|
||||
release_json = json.loads(release_response.content)
|
||||
|
||||
title = release_json['name']
|
||||
@ -53,8 +45,7 @@ appcast = appcast_template.substitute(
|
||||
file_url=download_url,
|
||||
bundle_version=bundle_version,
|
||||
marketing_version=marketing_version,
|
||||
file_length=file_size,
|
||||
signature=file_signature
|
||||
signature_output=file_signature
|
||||
)
|
||||
|
||||
appcast_file_name = 'appcast_snapshot.xml' if is_snapshot else 'appcast.xml'
|
||||
|
@ -1,13 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<channel>
|
||||
<title>VimR with NeoVim</title>
|
||||
<link>http://vimr.org</link>
|
||||
<link>https://twitter.com/vimrefined</link>
|
||||
<description>Most recent changes with links to updates for VimR.</description>
|
||||
<language>en</language>
|
||||
<item>
|
||||
<title>${title}</title>
|
||||
<link>https://twitter.com/vimrefined</link>
|
||||
<sparkle:version>${bundle_version}</sparkle:version>
|
||||
<sparkle:shortVersionString>${marketing_version}</sparkle:shortVersionString>
|
||||
<description><![CDATA[
|
||||
${release_notes}
|
||||
]]></description>
|
||||
@ -15,12 +17,9 @@
|
||||
${release_notes_link}
|
||||
</releaseNotesLink>
|
||||
<pubDate>${publication_date}</pubDate>
|
||||
<minimumSystemVersion>10.12.0</minimumSystemVersion>
|
||||
<minimumSystemVersion>10.13.0</minimumSystemVersion>
|
||||
<enclosure url="${file_url}"
|
||||
sparkle:version="${bundle_version}"
|
||||
sparkle:shortVersionString="${marketing_version}"
|
||||
sparkle:dsaSignature="${signature}"
|
||||
length="${file_length}"
|
||||
${signature_output}
|
||||
type="application/octet-stream"/>
|
||||
</item>
|
||||
</channel>
|
||||
|
Loading…
Reference in New Issue
Block a user