streeter / facebook-aperture-exporter

Export pictures in Apple's Aperture to Facebook.
http://www.chrisstreeter.com/archive/2010/11/688/facebook-exporter-for-aperture
MIT License
17 stars 4 forks source link

Some improvements #6

Closed alinx closed 13 years ago

alinx commented 13 years ago
alinx commented 13 years ago

Added Growl notifications

alinx commented 13 years ago

Hi Chris,

do you have time to release a new version of the plugin?

Best regards,

Alex

streeter commented 13 years ago

Hey Alex, I don't have XCode 3.X anymore, so I can't compile for OS 10.5 targets If you build off my branch, I'l upload the archive.

alinx commented 13 years ago

Hi Chris, I'll build a binary with Xcode 3.x. I think it's great if the user can update with sparkle.

A view minutes I pushed some more improvement.

I'll send you a message if I've build the binary

streeter commented 13 years ago

Not sure actually if your binary will work with Sparkle because I have to sign the release with my key.

alinx commented 13 years ago

Hi,

it should work. Because I didn't change the public key file and you sign the zip not the binary.

I think it works if you sign the zip with your private key and update the appcast.

Regards and thank you, Alex

streeter commented 13 years ago

Hey Alex, I can't find my private key to sign it, so I'm currently searching my TimeMachine backups for it. I know what it's called, and I thought I had put it in a secure place, so I'm just trying to find it right now.

alinx commented 13 years ago

Hi Chris,

you've added for the Sparkle framework a new target (Distribution) to Xcode with a run script. This script get the key from the keychain.

I paste the script here:

set -o errexit

[ $BUILD_STYLE = Release ] || { echo Distribution target requires "'Release'" build style; false; }

VERSION=$(defaults read "$BUILT_PRODUCTS_DIR/$PROJECT_NAME.ApertureExport/Contents/Info" CFBundleVersion)
DOWNLOAD_BASE_URL="https://github.com/downloads/streeter/facebook-aperture-exporter"
RELEASENOTES_URL="https://github.com/streeter/facebook-aperture-exporter/raw/master/release_notes.md"

ARCHIVE_FILENAME="$PROJECT_NAME.$VERSION.ApertureExport.zip"
DOWNLOAD_URL="$DOWNLOAD_BASE_URL/$ARCHIVE_FILENAME"
KEYCHAIN_PRIVKEY_NAME="Sparkle Private Key 1"

WD=$PWD
cd "$BUILT_PRODUCTS_DIR"
rm -f "$PROJECT_NAME"*.zip
ditto -ck --keepParent "$PROJECT_NAME.ApertureExport" "$ARCHIVE_FILENAME"

SIZE=$(stat -f %z "$ARCHIVE_FILENAME")
PUBDATE=$(LC_TIME=en_US 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 ] || { 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

Hope this will help.

Regards, Alex

streeter commented 13 years ago

Damn, yep, that reminded me. I knew I made it easy to release it. Created the signature and pushed an update to Appcast, and the update worked beautifully for me. Thanks for all the work dude!

alinx commented 13 years ago

Thanks! Hope there are no bugs.