From 366b49f0505c4029eae2fbe3d4ce8a6feaf048e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Thu, 5 Jun 2014 10:18:09 +0200 Subject: [PATCH 1/5] fix directory we seem to be already in cd packaging --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index eadf15ba25..eb3c0cd467 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,10 +44,10 @@ deploy: api_key: secure: "cMC68erxuf0jb4Pe0sOH4m1f7I2LWPUatD9BC0WeZ9PwTnWOzrm0hnjZIES4TTKVo8WIfZIiCfxpdAFeoh6bomG2MsKwSKMc8qHGhfNGqPnyzYh6zdPZaA+4Q3TDQI3DrziyDnQUFeH1h/7UZLDLxtDrOtcYcGdNg5VjvV9fJ7g=" file: - - packaging/build/OpenRA-$TRAVIS_TAG.exe - - packaging/build/OpenRA-$TRAVIS_TAG.zip - - packaging/build/openra-$TRAVIS_TAG-1-noarch.rpm - - packaging/build/openra_$TRAVIS_TAG_all.deb + - build/OpenRA-$TRAVIS_TAG.exe + - build/OpenRA-$TRAVIS_TAG.zip + - build/openra-$TRAVIS_TAG-1-noarch.rpm + - build/openra_$TRAVIS_TAG_all.deb skip_cleanup: true on: all_branches: true From 4c38a881b41f6a862af32c387bb9d857c99536c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Thu, 5 Jun 2014 10:19:16 +0200 Subject: [PATCH 2/5] don't dump into package.log --- packaging/linux/buildpackage.sh | 12 ++++++------ packaging/package-all.sh | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packaging/linux/buildpackage.sh b/packaging/linux/buildpackage.sh index 111bd660ea..e399eb8cf6 100755 --- a/packaging/linux/buildpackage.sh +++ b/packaging/linux/buildpackage.sh @@ -41,27 +41,27 @@ cd packaging/linux ( echo "Building Debian package." cd deb - ./buildpackage.sh "$TAG" ../$ROOTDIR "$PACKAGEDIR" &> package.log + ./buildpackage.sh "$TAG" ../$ROOTDIR "$PACKAGEDIR" if [ $? -ne 0 ]; then - echo "Debian package build failed, refer to $PWD/package.log." + echo "Debian package build failed." fi ) & ( echo "Building Arch-Linux package." cd pkgbuild - sh buildpackage.sh "$TAG" ../$ROOTDIR "$PACKAGEDIR" &> package.log + sh buildpackage.sh "$TAG" ../$ROOTDIR "$PACKAGEDIR" if [ $? -ne 0 ]; then - echo "Arch-Linux package build failed, refer to $PWD/package.log." + echo "Arch-Linux package build failed." fi ) & ( echo "Building RPM package." cd rpm - sh buildpackage.sh "$TAG" ../$ROOTDIR ~/rpmbuild "$PACKAGEDIR" &> package.log + sh buildpackage.sh "$TAG" ../$ROOTDIR ~/rpmbuild "$PACKAGEDIR" if [ $? -ne 0 ]; then - echo "RPM package build failed, refer to $PWD/package.log." + echo "RPM package build failed." fi ) & diff --git a/packaging/package-all.sh b/packaging/package-all.sh index 9a96eaa58d..1d438c9b75 100755 --- a/packaging/package-all.sh +++ b/packaging/package-all.sh @@ -83,27 +83,27 @@ echo "Creating packages..." ( cd windows - makensis -DSRCDIR="$BUILTDIR" -DDEPSDIR="${SRCDIR}/thirdparty/windows" OpenRA.nsi &> package.log + makensis -DSRCDIR="$BUILTDIR" -DDEPSDIR="${SRCDIR}/thirdparty/windows" OpenRA.nsi if [ $? -eq 0 ]; then mv OpenRA.exe "$OUTPUTDIR"/OpenRA-$TAG.exe else - echo "Windows package build failed, refer to windows/package.log." + echo "Windows package build failed." fi ) & ( cd osx - sh buildpackage.sh "$TAG" "$BUILTDIR" "${SRCDIR}/thirdparty/osx" "$OUTPUTDIR" &> package.log + sh buildpackage.sh "$TAG" "$BUILTDIR" "${SRCDIR}/thirdparty/osx" "$OUTPUTDIR" if [ $? -ne 0 ]; then - echo "OS X package build failed, refer to osx/package.log." + echo "OS X package build failed." fi ) & ( cd linux - sh buildpackage.sh "$TAG" "$BUILTDIR" "${SRCDIR}/thirdparty/linux" "$OUTPUTDIR" &> package.log + sh buildpackage.sh "$TAG" "$BUILTDIR" "${SRCDIR}/thirdparty/linux" "$OUTPUTDIR" if [ $? -ne 0 ]; then - echo "Linux package build failed, refer to linux/package.log." + echo "Linux package build failed." fi ) & From dd7e92112e0d207e0d4e63054d240e445a41a695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Thu, 5 Jun 2014 10:22:42 +0200 Subject: [PATCH 3/5] one at a time --- packaging/linux/buildpackage.sh | 45 ++++++++++++++--------------- packaging/package-all.sh | 51 +++++++++++++++------------------ 2 files changed, 44 insertions(+), 52 deletions(-) diff --git a/packaging/linux/buildpackage.sh b/packaging/linux/buildpackage.sh index e399eb8cf6..baf2c87d2d 100755 --- a/packaging/linux/buildpackage.sh +++ b/packaging/linux/buildpackage.sh @@ -38,32 +38,29 @@ cp *.html $PWD/packaging/linux/$ROOTDIR/usr/share/doc/openra/ cd packaging/linux -( - echo "Building Debian package." - cd deb - ./buildpackage.sh "$TAG" ../$ROOTDIR "$PACKAGEDIR" - if [ $? -ne 0 ]; then - echo "Debian package build failed." - fi -) & +pushd deb +echo "Building Debian package." +./buildpackage.sh "$TAG" ../$ROOTDIR "$PACKAGEDIR" +if [ $? -ne 0 ]; then + echo "Debian package build failed." +fi +popd -( - echo "Building Arch-Linux package." - cd pkgbuild - sh buildpackage.sh "$TAG" ../$ROOTDIR "$PACKAGEDIR" - if [ $? -ne 0 ]; then - echo "Arch-Linux package build failed." - fi -) & +pushd pkgbuild +echo "Building Arch-Linux package." +sh buildpackage.sh "$TAG" ../$ROOTDIR "$PACKAGEDIR" +if [ $? -ne 0 ]; then + echo "Arch-Linux package build failed." +fi +popd -( - echo "Building RPM package." - cd rpm - sh buildpackage.sh "$TAG" ../$ROOTDIR ~/rpmbuild "$PACKAGEDIR" - if [ $? -ne 0 ]; then - echo "RPM package build failed." - fi -) & +pushd rpm +echo "Building RPM package." +sh buildpackage.sh "$TAG" ../$ROOTDIR ~/rpmbuild "$PACKAGEDIR" +if [ $? -ne 0 ]; then + echo "RPM package build failed." +fi +popd wait diff --git a/packaging/package-all.sh b/packaging/package-all.sh index 1d438c9b75..20eee32c9c 100755 --- a/packaging/package-all.sh +++ b/packaging/package-all.sh @@ -74,40 +74,35 @@ cp thirdparty/RestSharp.dll packaging/built # Copy game icon for windows package cp OpenRA.Game/OpenRA.ico packaging/built -# -# Change into packaging directory and run the -# platform-dependant packaging in parallel -# cd packaging echo "Creating packages..." -( - cd windows - makensis -DSRCDIR="$BUILTDIR" -DDEPSDIR="${SRCDIR}/thirdparty/windows" OpenRA.nsi - if [ $? -eq 0 ]; then - mv OpenRA.exe "$OUTPUTDIR"/OpenRA-$TAG.exe - else - echo "Windows package build failed." - fi -) & +pushd windows +echo "Building Windows setup.exe" +makensis -DSRCDIR="$BUILTDIR" -DDEPSDIR="${SRCDIR}/thirdparty/windows" OpenRA.nsi +if [ $? -eq 0 ]; then + mv OpenRA.exe "$OUTPUTDIR"/OpenRA-$TAG.exe +else + echo "Windows package build failed." +fi +popd -( - cd osx - sh buildpackage.sh "$TAG" "$BUILTDIR" "${SRCDIR}/thirdparty/osx" "$OUTPUTDIR" - if [ $? -ne 0 ]; then - echo "OS X package build failed." - fi -) & +pushd osx +echo "Zipping OS X package" +sh buildpackage.sh "$TAG" "$BUILTDIR" "${SRCDIR}/thirdparty/osx" "$OUTPUTDIR" +if [ $? -ne 0 ]; then + echo "OS X package build failed." +fi +popd -( - cd linux - sh buildpackage.sh "$TAG" "$BUILTDIR" "${SRCDIR}/thirdparty/linux" "$OUTPUTDIR" - if [ $? -ne 0 ]; then - echo "Linux package build failed." - fi -) & +pushd linux +echo "Building Linux packages" +sh buildpackage.sh "$TAG" "$BUILTDIR" "${SRCDIR}/thirdparty/linux" "$OUTPUTDIR" +if [ $? -ne 0 ]; then + echo "Linux package build failed." +fi +popd -wait echo "Package build done." rm -rf $BUILTDIR From e6dea1335b5b897944d8a43d3991b4d7151963c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Thu, 5 Jun 2014 10:32:56 +0200 Subject: [PATCH 4/5] avoid an error when building from clean CI environment --- packaging/package-all.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/package-all.sh b/packaging/package-all.sh index 20eee32c9c..642897aebb 100755 --- a/packaging/package-all.sh +++ b/packaging/package-all.sh @@ -21,7 +21,7 @@ make package # Remove the mdb files that are created during `make` find . -path "*.mdb" -delete -rm Changelog.md +test -e Changelog.md && rm Changelog.md wget https://raw.githubusercontent.com/wiki/OpenRA/OpenRA/Changelog.md markdown Changelog.md > CHANGELOG.html markdown README.md > README.html From fd6a7695116cd444539cebd2b7d93d402e3acac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Thu, 5 Jun 2014 10:51:09 +0200 Subject: [PATCH 5/5] special Linux version name scheme --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index eb3c0cd467..96b73031c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,7 @@ notifications: skip_join: true before_deploy: - - echo $TRAVIS_TAG + - DOTVERSION=`echo $TRAVIS_TAG | sed "s/-/\\./g"` - cd packaging - mkdir build - ./package-all.sh $TRAVIS_TAG build @@ -46,8 +46,8 @@ deploy: file: - build/OpenRA-$TRAVIS_TAG.exe - build/OpenRA-$TRAVIS_TAG.zip - - build/openra-$TRAVIS_TAG-1-noarch.rpm - - build/openra_$TRAVIS_TAG_all.deb + - build/openra-$DOTVERSION-1-noarch.rpm + - build/openra_$DOTVERSION_all.deb skip_cleanup: true on: all_branches: true