Removed build number in released filename and added computation of resource URL based on release name.

This commit is contained in:
xawotihs
2014-01-17 21:50:10 +01:00
parent 1d33de59a9
commit f97d9805dd
4 changed files with 26 additions and 12 deletions
+6 -3
View File
@@ -70,14 +70,17 @@ int main(int argc, char* argv[])
#endif //QT_WIDGET #endif //QT_WIDGET
app->setApplicationName(WagicCore::getApplicationName()); app->setApplicationName(WagicCore::getApplicationName());
DownloadRequest* downloadRequest = NULL;
#ifdef WAGIC_RESOURCE_URL
Downloader*downloader = Downloader::GetInstance(); Downloader*downloader = Downloader::GetInstance();
DownloadRequest* downloadRequest = downloader->Get( downloadRequest = downloader->Get(
"core.zip", "core.zip",
"https://github.com/WagicProject/wagic/releases/download/latest-master/Wagic-core-288.zip" WAGIC_RESOURCE_URL
); );
#endif
#ifdef QT_WIDGET #ifdef QT_WIDGET
g_glwidget = new WagicCore(); g_glwidget = new WagicCore();
if(downloadRequest->getDownloadStatus() == DownloadRequest::DOWNLOADED) if(!downloadRequest || downloadRequest->getDownloadStatus() == DownloadRequest::DOWNLOADED)
{ {
g_glwidget->start(0); g_glwidget->start(0);
} }
+2 -1
View File
@@ -3,7 +3,7 @@
<property file="build.properties" /> <property file="build.properties" />
<property file="build.number.properties" /> <property file="build.number.properties" />
<property environment="env"/> <property environment="env"/>
<path id="groovy.class.path" > <path id="groovy.class.path" >
<fileset dir="${groovy.dir}" /> <fileset dir="${groovy.dir}" />
</path> </path>
@@ -91,6 +91,7 @@ Author: Michael Nguyen
#define WAGIC_VERSION_STRING VERSION_STRINGIFY(WAGIC_VERSION) #define WAGIC_VERSION_STRING VERSION_STRINGIFY(WAGIC_VERSION)
#define WAGIC_CORE_VERSION_STRING "core_" VERSION_STRINGIFY(WAGIC_RESOURCE_VERSION) #define WAGIC_CORE_VERSION_STRING "core_" VERSION_STRINGIFY(WAGIC_RESOURCE_VERSION)
#define WAGIC_RESOURCE_NAME WAGIC_CORE_VERSION_STRING ".zip" #define WAGIC_RESOURCE_NAME WAGIC_CORE_VERSION_STRING ".zip"
#define WAGIC_RESOURCE_URL "https://github.com/WagicProject/wagic/releases/download/${env.RELEASE_NAME}/Wagic-core.zip"
#endif #endif
+10
View File
@@ -5,6 +5,16 @@ echo PSPDEV = $PSPDEV
echo psp-config = `psp-config --psp-prefix` echo psp-config = `psp-config --psp-prefix`
echo ls = `ls` echo ls = `ls`
echo pwd = `pwd` echo pwd = `pwd`
# computing potential release name
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
if [ "$TRAVIS_BRANCH" == "alphas" ]; then
RELEASE_NAME = "alpha-${TRAVIS_BUILD_NUMBER}"
else if [ "$TRAVIS_BRANCH" == "master" ]; then
RELEASE_NAME = "latest-master"
fi
fi
fi
# updating versions with the TRAVIS build numbers # updating versions with the TRAVIS build numbers
cd projects/mtg/ cd projects/mtg/
+8 -8
View File
@@ -10,28 +10,28 @@ if [ "$TRAVIS_BRANCH" == "alphas" ]; then
-H "Accept: application/vnd.github.manifold-preview" \ -H "Accept: application/vnd.github.manifold-preview" \
-H "Content-Type: application/zip" \ -H "Content-Type: application/zip" \
--data-binary @core.zip \ --data-binary @core.zip \
"https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-core-${TRAVIS_BUILD_NUMBER}.zip" "https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-core.zip"
echo -e "Uploading android package\n" echo -e "Uploading android package\n"
curl -X POST -H "Authorization: token ${GH_TOKEN}" \ curl -X POST -H "Authorization: token ${GH_TOKEN}" \
-H "Accept: application/vnd.github.manifold-preview" \ -H "Accept: application/vnd.github.manifold-preview" \
-H "Content-Type: application/zip" \ -H "Content-Type: application/zip" \
--data-binary @projects/mtg/Android/bin/Wagic-debug.apk \ --data-binary @projects/mtg/Android/bin/Wagic-debug.apk \
"https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-android-${TRAVIS_BUILD_NUMBER}.apk" "https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-android.apk"
echo -e "Uploading PSP package\n" echo -e "Uploading PSP package\n"
curl -X POST -H "Authorization: token ${GH_TOKEN}" \ curl -X POST -H "Authorization: token ${GH_TOKEN}" \
-H "Accept: application/vnd.github.manifold-preview" \ -H "Accept: application/vnd.github.manifold-preview" \
-H "Content-Type: application/zip" \ -H "Content-Type: application/zip" \
--data-binary @projects/mtg/psprelease.zip \ --data-binary @projects/mtg/psprelease.zip \
"https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-psp-${TRAVIS_BUILD_NUMBER}.zip" "https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-psp.zip"
echo -e "Uploading Windows package\n" echo -e "Uploading Windows package\n"
curl -X POST -H "Authorization: token ${GH_TOKEN}" \ curl -X POST -H "Authorization: token ${GH_TOKEN}" \
-H "Accept: application/vnd.github.manifold-preview" \ -H "Accept: application/vnd.github.manifold-preview" \
-H "Content-Type: application/zip" \ -H "Content-Type: application/zip" \
--data-binary @build/win-cross/win-cross.zip \ --data-binary @build/win-cross/win-cross.zip \
"https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-windows-${TRAVIS_BUILD_NUMBER}.zip" "https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-windows.zip"
echo -e "Done uploading\n" echo -e "Done uploading\n"
fi fi
@@ -71,28 +71,28 @@ if [ "$TRAVIS_BRANCH" == "master" ]; then
-H "Accept: application/vnd.github.manifold-preview" \ -H "Accept: application/vnd.github.manifold-preview" \
-H "Content-Type: application/zip" \ -H "Content-Type: application/zip" \
--data-binary @core.zip \ --data-binary @core.zip \
"https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-core-${TRAVIS_BUILD_NUMBER}.zip" "https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-core.zip"
echo -e "Uploading android package\n" echo -e "Uploading android package\n"
curl -X POST -H "Authorization: token ${GH_TOKEN}" \ curl -X POST -H "Authorization: token ${GH_TOKEN}" \
-H "Accept: application/vnd.github.manifold-preview" \ -H "Accept: application/vnd.github.manifold-preview" \
-H "Content-Type: application/zip" \ -H "Content-Type: application/zip" \
--data-binary @projects/mtg/Android/bin/Wagic-debug.apk \ --data-binary @projects/mtg/Android/bin/Wagic-debug.apk \
"https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-android-${TRAVIS_BUILD_NUMBER}.apk" "https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-android.apk"
echo -e "Uploading PSP package\n" echo -e "Uploading PSP package\n"
curl -X POST -H "Authorization: token ${GH_TOKEN}" \ curl -X POST -H "Authorization: token ${GH_TOKEN}" \
-H "Accept: application/vnd.github.manifold-preview" \ -H "Accept: application/vnd.github.manifold-preview" \
-H "Content-Type: application/zip" \ -H "Content-Type: application/zip" \
--data-binary @projects/mtg/psprelease.zip \ --data-binary @projects/mtg/psprelease.zip \
"https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-psp-${TRAVIS_BUILD_NUMBER}.zip" "https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-psp.zip"
echo -e "Uploading Windows package\n" echo -e "Uploading Windows package\n"
curl -X POST -H "Authorization: token ${GH_TOKEN}" \ curl -X POST -H "Authorization: token ${GH_TOKEN}" \
-H "Accept: application/vnd.github.manifold-preview" \ -H "Accept: application/vnd.github.manifold-preview" \
-H "Content-Type: application/zip" \ -H "Content-Type: application/zip" \
--data-binary @build/win-cross/win-cross.zip \ --data-binary @build/win-cross/win-cross.zip \
"https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-windows-${TRAVIS_BUILD_NUMBER}.zip" "https://uploads.github.com/repos/WagicProject/wagic/releases/${IDDI}/assets?name=Wagic-windows.zip"
echo -e "Done uploading\n" echo -e "Done uploading\n"
fi fi