forked from dolphinoracle/lum-qt-appimage
-
Notifications
You must be signed in to change notification settings - Fork 6
/
travis.sh
34 lines (27 loc) · 1.04 KB
/
travis.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Build on Travis CI with or without Docker
set -e
if [ ! $(env | grep TRAVIS_JOB_ID ) ] ; then
echo "This script is supposed to run on Travis CI"
exit 1
fi
RECIPE="${1}"
DOCKER=$(echo "${RECIPE}" | cut -d "-" -f 1) # Allow e.g., a recipe called "inkscape-standalone" to use the "inkscape" Docker image
mkdir -p ./out/
if [ -f recipes/$RECIPE/Dockerfile ] && [ -f recipes/$RECIPE/Recipe ] ; then
# There is a Dockerfile, hence build using Docker
mv recipes/$RECIPE/Recipe ./out/Recipe
sed -i -e 's|sudo ||g' ./out/Recipe # For subsurface recipe
docker run -i -v ${PWD}/out:/out probonopd/appimages:$DOCKER /bin/bash -ex /out/Recipe
elif [ -f recipes/$RECIPE.yml ] ; then
# There is no Dockerfile but a YAML file for the meta Recipe
bash -ex pkg2appimage recipes/$RECIPE.yml
elif [ -f recipes/$RECIPE/Recipe ] ; then
# There is no Dockerfile but a Recipe, hence build without Docker
bash -ex recipes/$RECIPE/Recipe
else
# There is no Recipe
echo "Recipe not found, is RECIPE missing?"
exit 1
fi
ls -lh out/*.AppImage