diff options
author | István Váradi <ivaradi@users.noreply.github.com> | 2017-05-09 20:54:41 +0300 |
---|---|---|
committer | Daniel Hansson <daniel@techandme.se> | 2017-05-09 20:54:41 +0300 |
commit | 84dba8dfa357661aefee71bd51bf33370934a66c (patch) | |
tree | d146879ed8409bc48de37b90ea4d0350a2fbab7b | |
parent | bbc610c55bc5992176edea436c0409d00e0db115 (diff) |
Travis build for Debian (#141)
-rw-r--r-- | linux/debian/oscrc.enc | bin | 0 -> 5472 bytes | |||
-rwxr-xr-x | linux/debian/scripts/git2changelog.py | 5 | ||||
-rw-r--r-- | linux/debian/signing-key.txt.enc | bin | 6672 -> 6672 bytes | |||
-rwxr-xr-x | linux/debian/travis-build.sh | 37 |
4 files changed, 35 insertions, 7 deletions
diff --git a/linux/debian/oscrc.enc b/linux/debian/oscrc.enc Binary files differnew file mode 100644 index 0000000..aa93543 --- /dev/null +++ b/linux/debian/oscrc.enc diff --git a/linux/debian/scripts/git2changelog.py b/linux/debian/scripts/git2changelog.py index d1d36f2..a09e59b 100755 --- a/linux/debian/scripts/git2changelog.py +++ b/linux/debian/scripts/git2changelog.py @@ -41,7 +41,10 @@ def collectEntries(baseCommit, baseVersion): def genChangeLogEntries(f, entries, distribution): for (commit, name, email, date, revdate, subject, baseVersion) in entries: upstreamVersion = baseVersion + "-" + revdate - version = upstreamVersion + "~" + distribution + "1" + if distribution=="stable": + version = upstreamVersion + else: + version = upstreamVersion + "~" + distribution + "1" print >> f, "nextcloud-client (%s) %s; urgency=medium" % (version, distribution) print >> f print >> f, " * " + subject diff --git a/linux/debian/signing-key.txt.enc b/linux/debian/signing-key.txt.enc Binary files differindex ef62fa1..89d376a 100644 --- a/linux/debian/signing-key.txt.enc +++ b/linux/debian/signing-key.txt.enc diff --git a/linux/debian/travis-build.sh b/linux/debian/travis-build.sh index 22fb014..61ae220 100755 --- a/linux/debian/travis-build.sh +++ b/linux/debian/travis-build.sh @@ -4,13 +4,24 @@ set -xe TRAVIS_BUILD_STEP="$1" +PPA=ppa:nextcloud-devs/client + +OBS_PROJECT=home:ivaradi +OBS_PACKAGE=nextcloud-client +OBS_SUBDIR="${OBS_PROJECT}/${OBS_PACKAGE}" + if [ "$TRAVIS_BUILD_STEP" == "install" ]; then sudo apt-get update -q - sudo apt-get install -y devscripts cdbs + sudo apt-get install -y devscripts cdbs osc if test "$encrypted_585e03da75ed_key" -a "$encrypted_585e03da75ed_iv"; then openssl aes-256-cbc -K $encrypted_585e03da75ed_key -iv $encrypted_585e03da75ed_iv -in linux/debian/signing-key.txt.enc -d | gpg --import echo "DEBUILD_DPKG_BUILDPACKAGE_OPTS='-k7D14AA7B'" >> ~/.devscripts + + openssl aes-256-cbc -K $encrypted_585e03da75ed_key -iv $encrypted_585e03da75ed_iv -in linux/debian/oscrc.enc -out ~/.oscrc -d + elif test "$encrypted_8da7a4416c7a_key" -a "$encrypted_8da7a4416c7a_iv"; then + openssl aes-256-cbc -K $encrypted_8da7a4416c7a_key -iv $encrypted_8da7a4416c7a_iv -in linux/debian/oscrc.enc -out ~/.oscrc -d + PPA=ppa:ivaradi/nextcloud-client-exp fi elif [ "$TRAVIS_BUILD_STEP" == "script" ]; then @@ -29,7 +40,7 @@ elif [ "$TRAVIS_BUILD_STEP" == "script" ]; then origsourceopt="-sa" fi - for distribution in trusty xenial yakkety zesty; do + for distribution in trusty xenial yakkety zesty stable; do rm -rf nextcloud-client_${basever} cp -a client_theming nextcloud-client_${basever} @@ -62,8 +73,22 @@ elif [ "$TRAVIS_BUILD_STEP" == "script" ]; then elif [ "$TRAVIS_BUILD_STEP" == "snap_store_deploy" ]; then cd .. - for changes in nextcloud-client*_source.changes; do - #dput ppa:ivaradi/nextcloud-client-exp $changes > /dev/null - dput ppa:nextcloud-devs/client $changes > /dev/null - done + if test "$encrypted_585e03da75ed_key" -a "$encrypted_585e03da75ed_iv"; then + for changes in nextcloud-client*_source.changes; do + dput $PPA $changes > /dev/null + done + fi + + mkdir osc + cd osc + osc co ${OBS_PROJECT} ${OBS_PACKAGE} + osc delete ${OBS_SUBDIR}/* + cp ../nextcloud-client*.orig.tar.* ${OBS_SUBDIR}/ + cp ../nextcloud-client_*[0-9.][0-9].dsc ${OBS_SUBDIR}/ + cp ../nextcloud-client_*[0-9.][0-9].debian.tar* ${OBS_SUBDIR}/ + cp ../nextcloud-client_*[0-9.][0-9]_source.changes ${OBS_SUBDIR}/ + osc add ${OBS_SUBDIR}/* + + cd ${OBS_SUBDIR} + osc commit -m "Travis update" fi |