Commit 568f518feb9c48b557d07923432c5fcd5b79b7c4
1 parent
a6f206ad
Be more general about environment
* Allow any Ubuntu 14.04, not specifically 14.04.5 * Work properly if not running in Travis CI
Showing
1 changed file
with
7 additions
and
3 deletions
appimage/build-appimage
| ... | ... | @@ -49,7 +49,7 @@ fi |
| 49 | 49 | _osversion=$(cat /etc/os-release | grep PRETTY_NAME | awk -F'=' '{print $2}' | sed 's#"##g') |
| 50 | 50 | |
| 51 | 51 | # Warn users building the AppImage locally: |
| 52 | -if [ x"$_osversion" != x"Ubuntu 14.04.5 LTS" ] ; then | |
| 52 | +if [[ ! $_osversion =~ Ubuntu\ 14.04.*\ LTS ]]; then | |
| 53 | 53 | set +x |
| 54 | 54 | echo "" |
| 55 | 55 | # 0 1 2 3 4 5 6 7 |
| ... | ... | @@ -160,7 +160,7 @@ unset QTDIR; unset QT_PLUGIN_PATH; unset LD_LIBRARY_PATH |
| 160 | 160 | rm appdir/AppRun; cp $top/appimage/AppRun appdir; chmod a+x appdir/AppRun |
| 161 | 161 | |
| 162 | 162 | # If we are not on Ubuntu Trusty, we need to disable 'appstreamcli' validation: |
| 163 | -if [ x"$_osversion" == x"Ubuntu 14.04.5 LTS" ] ; then | |
| 163 | +if [[ $_osversion =~ Ubuntu\ 14.04.*\ LTS ]]; then | |
| 164 | 164 | appimagetool_param="" |
| 165 | 165 | else |
| 166 | 166 | appimagetool_param="-n" |
| ... | ... | @@ -177,7 +177,11 @@ fi |
| 177 | 177 | |
| 178 | 178 | # Set up a version string to include in the AppImage name |
| 179 | 179 | MAJOR_QPDF_VERSION=$( ./appdir/usr/bin/qpdf --version | grep "qpdf version" | awk '{print $3}' ) |
| 180 | -VERSION=${MAJOR_QPDF_VERSION}-continuous-${TRAVIS_JOB_NUMBER}-$(date "+%Y-%m-%d")-git.$(git rev-parse --short HEAD)-x86_64 | |
| 180 | +if [ "$TRAVIS_JOB_NUMBER" != "" ]; then | |
| 181 | + VERSION=${MAJOR_QPDF_VERSION}-continuous-${TRAVIS_JOB_NUMBER}-$(date "+%Y-%m-%d")-git.$(git rev-parse --short HEAD) | |
| 182 | +else | |
| 183 | + VERSION=${MAJOR_QPDF_VERSION} | |
| 184 | +fi | |
| 181 | 185 | |
| 182 | 186 | # Remove the default AppRun/symlink and use our own custom AppRun script |
| 183 | 187 | rm appdir/AppRun; cp $top/appimage/AppRun appdir; chmod a+x appdir/AppRun | ... | ... |