Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

preserving old version of package-distribution.sh before cleanup

  • Loading branch information...
commit 37a5d6134f6fb48115c18bea8dde195e9ba9c5b3 1 parent 404d52b
@liyanage authored
Showing with 69 additions and 0 deletions.
  1. 0  readme.txt → notes.txt
  2. +69 −0 package-distribution.sh
View
0  readme.txt → notes.txt
File renamed without changes
View
69 package-distribution.sh
@@ -0,0 +1,69 @@
+#!/bin/bash
+
+set -o errexit
+
+WD=$PWD
+PRODUCT_SHORTNAME=album-artwork-assistant
+
+[ $BUILD_STYLE = Release ] || { echo Distribution target requires "'Release'" build style; false; }
+
+VERSION=$(defaults read "$BUILT_PRODUCTS_DIR/$PROJECT_NAME.app/Contents/Info" CFBundleVersion)
+DOWNLOAD_BASE_URL="http://www2.entropy.ch/download"
+RELEASENOTES_URL="http://www.entropy.ch/software/macosx/$PRODUCT_SHORTNAME/release-notes.html#version-$VERSION"
+
+ARCHIVE_FILENAME="$PROJECT_NAME $VERSION.zip"
+ARCHIVE_FILENAME_UNVERSIONED="$PROJECT_NAME.zip"
+DOWNLOAD_URL="$DOWNLOAD_BASE_URL/$ARCHIVE_FILENAME"
+KEYCHAIN_PRIVKEY_NAME="Sparkle Private Key 1"
+
+cd "$BUILT_PRODUCTS_DIR"
+rm -f "$PROJECT_NAME"*.zip
+#zip -qr "$ARCHIVE_FILENAME" "$PROJECT_NAME.app"
+ditto -ck --keepParent "$PROJECT_NAME.app" "$ARCHIVE_FILENAME"
+
+SIZE=$(stat -f %z "$ARCHIVE_FILENAME")
+PUBDATE=$(date +"%a, %d %b %G %T %z")
+#SIGNATURE=$(
+# openssl dgst -sha1 -binary < "$ARCHIVE_FILENAME" \
+# | openssl dgst -dss1 -sign <(security find-generic-password -g -s "$KEYCHAIN_PRIVKEY_NAME" 2>&1 1>/dev/null | perl -pe '($_) = /"(.+)"/; s/\\012/\n/g' | perl -MXML::LibXML -e 'print XML::LibXML->new()->parse_file("-")->findvalue(q(//string[preceding-sibling::key[1] = "NOTE"]))') \
+# | openssl enc -base64
+#)
+SIGNATURE=$(
+ openssl dgst -sha1 -binary < "$ARCHIVE_FILENAME" \
+ | openssl dgst -dss1 -sign <(security find-generic-password -g -s "$KEYCHAIN_PRIVKEY_NAME" 2>&1 1>/dev/null | perl -pe '($_) = /"(.+)"/; s/\\012/\n/g') \
+ | openssl enc -base64
+)
+
+[ $SIGNATURE ] || { echo Unable to load signing private key with name "'$KEYCHAIN_PRIVKEY_NAME'" from keychain; false; }
+
+cat <<EOF
+ <item>
+ <title>Version $VERSION</title>
+ <sparkle:releaseNotesLink>$RELEASENOTES_URL</sparkle:releaseNotesLink>
+ <pubDate>$PUBDATE</pubDate>
+ <enclosure
+ url="$DOWNLOAD_URL"
+ sparkle:version="$VERSION"
+ type="application/octet-stream"
+ length="$SIZE"
+ sparkle:dsaSignature="$SIGNATURE"
+ />
+ </item>
+EOF
+
+echo scp "'$BUILT_PRODUCTS_DIR/$ARCHIVE_FILENAME'" www2.entropy.ch:download/
+echo scp "'$BUILT_PRODUCTS_DIR/$ARCHIVE_FILENAME'" "\"www2.entropy.ch:'download/$ARCHIVE_FILENAME_UNVERSIONED'\""
+
+echo scp "'$WD/Resources/release-notes.html'" www.entropy.ch:web/software/macosx/$PRODUCT_SHORTNAME/release-notes.html
+echo scp "'$WD/appcast.xml'" www.entropy.ch:web/software/macosx/$PRODUCT_SHORTNAME/appcast.xml
+
+echo git commit -a -m "'version $VERSION'"
+echo git tag -a "'v$VERSION'" -m "'version $VERSION'"
+echo git push --all
+echo git push --tags
+echo git push --all github
+echo git push --tags github
+echo
+#echo git archive --format=zip --prefix="'$PRODUCT_SHORTNAME-src/'" HEAD \> "'$BUILT_PRODUCTS_DIR/$PRODUCT_SHORTNAME-src.zip'"
+#echo scp "'$BUILT_PRODUCTS_DIR/$PRODUCT_SHORTNAME-src.zip'" www2.entropy.ch:download/
+open "$BUILT_PRODUCTS_DIR"

0 comments on commit 37a5d61

Please sign in to comment.
Something went wrong with that request. Please try again.