mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-23 19:21:53 +03:00
Temp
This commit is contained in:
parent
0bed6504b2
commit
cb3ca57298
10
bin/build.sh
10
bin/build.sh
@ -23,7 +23,13 @@ COMPOUND_VERSION="v${MARKETING_VERSION}-${BUNDLE_VERSION}"
|
||||
if [ ${IS_SNAPSHOT} = true ] ; then
|
||||
COMPOUND_VERSION="v${MARKETING_VERSION}-${BUNDLE_VERSION}"
|
||||
fi
|
||||
TAG=${COMPOUND_VERSION}
|
||||
VIMR_FILE_NAME="VimR-${COMPOUND_VERSION}.tar.bz2"
|
||||
|
||||
./bin/commit_and_push_tags.sh "${BRANCH}" "${COMPOUND_VERSION}"
|
||||
#./bin/commit_and_push_tags.sh "${BRANCH}" "${TAG}"
|
||||
|
||||
./bin/create_github_release.sh "${COMPOUND_VERSION}" "${RELEASE_NOTES}"
|
||||
#./bin/create_github_release.sh "${TAG}" "${VIMR_FILE_NAME}" "${RELEASE_NOTES}"
|
||||
|
||||
pushd build/Release
|
||||
./bin/set_appcast.py "${VIMR_FILE_NAME}" "${BUNDLE_VERSION}" "${MARKETING_VERSION}" "${TAG}"
|
||||
popd
|
@ -1,9 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
COMPOUND_VERSION=$1
|
||||
RELEASE_NOTES=$2
|
||||
|
||||
VIMR_FILE_NAME="VimR-${COMPOUND_VERSION}.tar.bz2"
|
||||
VIMR_FILE_NAME=$2
|
||||
RELEASE_NOTES=$3
|
||||
|
||||
pushd build/Release
|
||||
|
||||
|
@ -1,2 +0,0 @@
|
||||
#!/usr/bin/python2.7
|
||||
|
50
bin/set_appcast.py
Executable file
50
bin/set_appcast.py
Executable file
@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# pip install requests
|
||||
# pip install Markdown
|
||||
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
import requests
|
||||
import json
|
||||
import markdown
|
||||
from datetime import datetime
|
||||
from string import Template
|
||||
|
||||
SIGN_UPDATE = './bin/sign_update'
|
||||
PRIVATE_KEY_PATH = os.path.expanduser('~/Projects/sparkle_priv.pem')
|
||||
|
||||
file_path = sys.argv[1]
|
||||
bundle_version = sys.argv[2]
|
||||
marketing_version = sys.argv[3]
|
||||
tag_name = sys.argv[4]
|
||||
|
||||
file_size = os.stat(file_path).st_size
|
||||
file_signature = subprocess.check_output([SIGN_UPDATE, file_path, PRIVATE_KEY_PATH]).strip()
|
||||
|
||||
appcast_template_file = open('resources/appcast_template.xml', 'r')
|
||||
appcast_template = Template(appcast_template_file.read())
|
||||
appcast_template_file.close()
|
||||
|
||||
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']
|
||||
download_url = release_json['assets'][0]['browser_download_url']
|
||||
release_notes_url = release_json['html_url']
|
||||
release_notes = release_json['body']
|
||||
|
||||
appcast = appcast_template.substitute(
|
||||
title=title,
|
||||
release_notes=markdown.markdown(release_notes),
|
||||
release_notes_link=release_notes_url,
|
||||
publication_date=datetime.now().isoformat(),
|
||||
file_url=download_url,
|
||||
bundle_version=bundle_version,
|
||||
marketing_version=marketing_version,
|
||||
file_length=file_size,
|
||||
signature=file_signature
|
||||
)
|
||||
|
||||
print(appcast)
|
9
bin/sign_update
Executable file
9
bin/sign_update
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -o pipefail
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Usage: $0 update_archive private_key"
|
||||
exit 1
|
||||
fi
|
||||
openssl=/usr/bin/openssl
|
||||
$openssl dgst -sha1 -binary < "$1" | $openssl dgst -dss1 -sign "$2" | $openssl enc -base64
|
@ -1,10 +1,13 @@
|
||||
<item>
|
||||
<title>${title}</title>
|
||||
<description><![CDATA[
|
||||
${release_notes}
|
||||
]]></description>
|
||||
<sparkle:releaseNotesLink>
|
||||
${release_notes_link}
|
||||
</sparkle:releaseNotesLink>
|
||||
<pubDate>${publication_date}</pubDate>
|
||||
<sparkle:minimumSystemVersion>${min_macos_version}</sparkle:minimumSystemVersion>
|
||||
<sparkle:minimumSystemVersion>10.11.0</sparkle:minimumSystemVersion>
|
||||
<enclosure url="${file_url}"
|
||||
sparkle:version="${bundle_version}"
|
||||
sparkle:shortVersionString="${marketing_version}"
|
||||
|
Loading…
Reference in New Issue
Block a user