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: