From 059f2db64d417fd658990f27e7d2053902496dde Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Tue, 22 Nov 2016 01:54:04 -0600 Subject: [PATCH] dont build docker image if we already have a cached copy of it. --- .gitignore | 1 + build/utils.sh | 28 ++++++++++++++++++++++++++++ circle.yml | 6 +++--- 3 files changed, 32 insertions(+), 3 deletions(-) create mode 100755 build/utils.sh diff --git a/.gitignore b/.gitignore index f2c451d..c06397f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ build/** !build/.gitignore !build/ci/Dockerfile +!build/utils.sh src/greeter-resources.h src/config.h cmake-build-debug diff --git a/build/utils.sh b/build/utils.sh new file mode 100755 index 0000000..8ee57a2 --- /dev/null +++ b/build/utils.sh @@ -0,0 +1,28 @@ +#!/bin/bash + + +combine_javascript_sources() { + cd "${MESON_SOURCE_ROOT}/src/gresource/js" && { + cat _vendor/moment-with-locales.min.js \ + LightDMObjects.js \ + Greeter.js \ + GreeterConfig.js \ + ThemeUtils.js \ + ThemeHeartbeat.js > bundle.js + } +} + +list_javascript_sources() { + cd "${MESON_SOURCE_ROOT}/src" && find gresource/js -type f -name '*.js' -print +} + + +case "$1" in + combine-js) + combine_javascript_sources + ;; + + get-js-files) + list_javascript_sources + ;; +esac diff --git a/circle.yml b/circle.yml index 3905ed4..ceb76ed 100644 --- a/circle.yml +++ b/circle.yml @@ -7,9 +7,9 @@ dependencies: cache_directories: - ~/docker override: - - if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi - - docker build --rm=false -t antergos/ci-ubuntu build/ci - - mkdir -p ~/docker; docker save antergos/ci-ubuntu > ~/docker/image.tar + - '[[ -e ~/docker/image.tar ]] && docker load -i ~/docker/image.tar' + - '[[ -e ~/docker/image.tar ]] || docker build --rm=false -t antergos/ci-ubuntu build/ci' + - '[[ -e ~/docker/image.tar ]] || mkdir -p ~/docker; docker save antergos/ci-ubuntu > ~/docker/image.tar' test: override: