Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml1
-rwxr-xr-xscripts/travis-build.sh21
-rw-r--r--snap/CMakeLists.txt11
3 files changed, 27 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index af595819c..e97d7e5c5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -45,6 +45,7 @@ env:
- DEB_BUILD_OPTIONS='-DCMAKE_BUILD_TYPE=Debug -DWITH_SSE2=ON -DWITH_APPINDICATOR=OFF'
- DOCKER_IMAGE=ubuntu:xenial
- SNAP_PRIME_ON_PULL_REQUEST=true
+ - SNAP_TRANSFER_SH_UPLOAD_ON_PULL_REQUEST=true
- SNAP_UNSTABLE_CHANNEL=edge
- SNAP_RELEASE_CHANNEL=stable
- SNAPCRAFT_CONFIG_KEY=$encrypted_8816994192a9_key
diff --git a/scripts/travis-build.sh b/scripts/travis-build.sh
index a7b76837b..289873e0d 100755
--- a/scripts/travis-build.sh
+++ b/scripts/travis-build.sh
@@ -74,7 +74,7 @@ elif [ "$BUILD_TYPE" == "snap" ]; then
docker run --name $DOCKER_BUILDER_NAME -v $PWD:$PWD -w $PWD -td $DOCKER_IMAGE
elif [ "$TRAVIS_BUILD_STEP" == "install" ]; then
docker_exec apt-get update -q
- docker_exec apt-get install cmake git-core snapcraft -y
+ docker_exec apt-get install -y cmake git-core snapcraft
elif [ "$TRAVIS_BUILD_STEP" == "script" ]; then
git clean -f
mkdir $BUILD_FOLDER
@@ -87,12 +87,21 @@ elif [ "$BUILD_TYPE" == "snap" ]; then
docker_exec make $make_target -C $BUILD_FOLDER
elif [ "$TRAVIS_BUILD_STEP" == "after_success" ]; then
- sudo mkdir -p $BUILD_FOLDER/snap/.snapcraft -m 777
set +x
- openssl aes-256-cbc -K $SNAPCRAFT_CONFIG_KEY \
- -iv $SNAPCRAFT_CONFIG_IV \
- -in snap/.snapcraft/travis_snapcraft.cfg \
- -out $BUILD_FOLDER/snap/.snapcraft/snapcraft.cfg -d
+ if [ -n "$SNAPCRAFT_CONFIG_KEY" ] && [ -n "$SNAPCRAFT_CONFIG_IV" ]; then
+ sudo mkdir -p $BUILD_FOLDER/snap/.snapcraft -m 777
+ openssl aes-256-cbc -K $SNAPCRAFT_CONFIG_KEY \
+ -iv $SNAPCRAFT_CONFIG_IV \
+ -in snap/.snapcraft/travis_snapcraft.cfg \
+ -out $BUILD_FOLDER/snap/.snapcraft/snapcraft.cfg -d
+ fi
+ set -x
+
+ if [ "$TRAVIS_PULL_REQUEST" != "false" ] &&
+ [ "$SNAP_TRANSFER_SH_UPLOAD_ON_PULL_REQUEST" == "true" ]; then
+ docker_exec apt-get install -y curl
+ docker_exec make snap-push-transfer.sh -C $BUILD_FOLDER
+ fi
elif [ "$TRAVIS_BUILD_STEP" == "deploy-unstable" ]; then
docker_exec make snap-push-$SNAP_UNSTABLE_CHANNEL -C $BUILD_FOLDER
elif [ "$TRAVIS_BUILD_STEP" == "deploy-release" ]; then
diff --git a/snap/CMakeLists.txt b/snap/CMakeLists.txt
index 0b2f76cd3..8ff9e7ad9 100644
--- a/snap/CMakeLists.txt
+++ b/snap/CMakeLists.txt
@@ -81,3 +81,14 @@ foreach(channel stable candidate beta edge)
)
add_dependencies("snap-push-${channel}" "snap")
endforeach(channel)
+
+add_custom_target("snap-push-transfer.sh"
+ COMMAND bash -c "snap=$(ls *.snap -1 | head -n1); \
+ curl --upload-file $snap \
+ https://transfer.sh/$(basename $snap)"
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+ DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/snapcraft.yaml"
+ COMMENT "Create snap package ${SNAP_VERSION}"
+ VERBATIM
+ )
+add_dependencies("snap-push-transfer.sh" "snap")