Skip to content

Commit

Permalink
Prep for the file downloads going to sf.net.
Browse files Browse the repository at this point in the history
Also fix a bug where a ResourceRules.plist was required.
  • Loading branch information
dak180 authored and barijaona committed Dec 29, 2012
1 parent 9d5567a commit 346b7c5
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 15 deletions.
3 changes: 2 additions & 1 deletion Release Instructions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ Tags should be in one of the following formats:
3. Make a new tag using `git tag -s` (if you do not have a gpg key you can use `git tag -a` instead).
4. Run `make clean`.
5. Run `make release`.
6. Upload the contents of `Deployment/Uploads` (found in the build directory).
6. Upload the contents of `Deployment/Uploads` (found in the build directory). It is important that everything gets put in the right place: the .xml file goes in the base directory, for a 3.0.0 beta 2 release everything else goes in `TestVersions/3.0.0_beta2/`, for 3.0.0 Release Candidate 1 `TestVersions/3.0.0_rc1/` and for 3.0.0 stable `ReleasedVersions/3.0.0/`
7. Ensure that any directories you have created are set to be group writable.
2 changes: 1 addition & 1 deletion Resources/Vienna-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
<key>NSPrincipalClass</key>
<string>ViennaApp</string>
<key>SUFeedURL</key>
<string>https://github.com/downloads/ViennaRSS/vienna-rss/changelog.xml</string>
<string>$(BASE_URL_TYP)://$(BASE_URL_LOC)/changelog.xml</string>
<key>SmartCrashReports_CompanyName</key>
<string>OpenCommunity</string>
<key>SmartCrashReports_EmailTicket</key>
Expand Down
3 changes: 3 additions & 0 deletions configs/Project-All.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES
GCC_PRECOMPILE_PREFIX_HEADER = YES
GCC_PREFIX_HEADER = src/Vienna_Prefix.pch

BASE_URL_TYP = http
BASE_URL_LOC = downloads.sourceforge.net/project/vienna-rss
40 changes: 27 additions & 13 deletions configs/scripts/Release-to-Github.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
#!/bin/bash

. "${OBJROOT}/autorevision.tmp"
BUILD_NUMBER="2821"
BUILD_NUMBER="2821" # Magic number; do not touch!
N_VCS_NUM="$(echo "${BUILD_NUMBER} + ${VCS_NUM}" | bc)"
N_VCS_TAG="$(echo "${VCS_TAG}" | sed -e 's:^v/::')"
N_VCS_TAG="$(echo "${VCS_TAG}" | sed -e 's:^v/::')" # for urls/files
V_VCS_TAG="$(echo "${N_VCS_TAG}" | sed -e 's:_beta: Beta :' -e 's:_rc: RC :')" # for display
VIENNA_UPLOADS_DIR="${BUILT_PRODUCTS_DIR}/Uploads"
DOWNLOAD_BASE_URL="https://github.com/downloads/ViennaRSS/vienna-rss"
DOWNLOAD_BASE_URL="${BASE_URL_TYP}://${BASE_URL_LOC}" # values set in project-all.xcconfig
TGZ_FILENAME="Vienna${N_VCS_TAG}.${VCS_SHORT_HASH}.tgz"
dSYM_FILENAME="Vienna${N_VCS_TAG}.${VCS_SHORT_HASH}-dSYM"
if [[ "${VCS_TAG}" == *_beta* ]]; then
VIENNA_CHANGELOG="changelog_beta.xml"
else
VIENNA_CHANGELOG="changelog.xml"
fi
case "${N_VCS_TAG}" in
*_beta*)
VIENNA_CHANGELOG="changelog_beta.xml"
DOWNLOAD_SUB_DIR="TestVersions"
;;
*_rc*)
VIENNA_CHANGELOG="changelog_rc.xml"
DOWNLOAD_SUB_DIR="TestVersions"
;;
*)
VIENNA_CHANGELOG="changelog.xml"
DOWNLOAD_SUB_DIR="ReleasedVersions"
;;
esac
DOWNLOAD_TAG_DIR="${N_VCS_TAG}"
DOWNLOAD_BASE_URL="${DOWNLOAD_BASE_URL}/${DOWNLOAD_SUB_DIR}/${DOWNLOAD_TAG_DIR}"

# codesign setup
function signd {
Expand All @@ -23,7 +35,7 @@ function signd {
local appth="${BUILT_PRODUCTS_DIR}/Vienna.app"

# Sign and verify the app
if [ ! -z "${idetd}" ]; then
if [ ! -z "${resrul}" ]; then
cp -a "${resrul}" "${appth}/ResourceRules.plist"
codesign -f -s "${idetd}" --resource-rules="${appth}/ResourceRules.plist" -vvv "${appth}"
rm "${appth}/ResourceRules.plist"
Expand All @@ -32,7 +44,7 @@ function signd {
fi
codesign -vvv --verify "${appth}"
else
echo "warning: No code signing identity configured; code will not be signed."
echo "warning: No code signing identity configured; code will not be signed." 1>&2
fi
}

Expand Down Expand Up @@ -63,8 +75,10 @@ mv "${TGZ_FILENAME}" "${VIENNA_UPLOADS_DIR}"

# Output the sparkle change log
cd "${VIENNA_UPLOADS_DIR}"

pubDate="$(LC_TIME=en_US date -jf '%FT%T%z' "${VCS_DATE}" '+%a, %d %b %G %T %z')"
TGZSIZE="$(stat -f %z "${TGZ_FILENAME}")"

cat > "${VIENNA_CHANGELOG}" << EOF
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
Expand All @@ -75,11 +89,11 @@ cat > "${VIENNA_CHANGELOG}" << EOF
<language>en-us</language>
<copyright>Copyright 2010-2012, Steve Palmer and contributors</copyright>
<item>
<title>Vienna ${N_VCS_TAG} :${VCS_SHORT_HASH}:</title>
<title>Vienna ${V_VCS_TAG} :${VCS_SHORT_HASH}:</title>
<pubDate>${pubDate}</pubDate>
<link>${DOWNLOAD_BASE_URL}/Vienna${N_VCS_TAG}.${VCS_SHORT_HASH}.tgz</link>
<link>${DOWNLOAD_BASE_URL}/${TGZ_FILENAME}</link>
<sparkle:minimumSystemVersion>${MACOSX_DEPLOYMENT_TARGET}.0</sparkle:minimumSystemVersion>
<enclosure url="${DOWNLOAD_BASE_URL}/Vienna${N_VCS_TAG}.${VCS_SHORT_HASH}.tgz" sparkle:version="${N_VCS_NUM}" sparkle:shortVersionString="${N_VCS_TAG} :${VCS_SHORT_HASH}:" length="${TGZSIZE}" type="application/octet-stream"/>
<enclosure url="${DOWNLOAD_BASE_URL}/${TGZ_FILENAME}" sparkle:version="${N_VCS_NUM}" sparkle:shortVersionString="${V_VCS_TAG} :${VCS_SHORT_HASH}:" length="${TGZSIZE}" type="application/octet-stream"/>
<sparkle:releaseNotesLink>${DOWNLOAD_BASE_URL}/noteson${N_VCS_TAG}.${VCS_SHORT_HASH}.html</sparkle:releaseNotesLink>
</item>
</channel>
Expand Down

0 comments on commit 346b7c5

Please sign in to comment.