Skip to content

Commit

Permalink
Added --skip-if-built flag for build-preferences command
Browse files Browse the repository at this point in the history
  • Loading branch information
gornostal committed May 26, 2019
1 parent f749f30 commit 4d08bc5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/build-deb.sh
Expand Up @@ -37,7 +37,7 @@ build-deb () {
tmpsrc="$tmpdir/$name"

info "Building Preferences UI"
./ul build-preferences
./ul build-preferences --skip-if-built

info "Copying src to a temp dir"
rm -rf $tmpdir/* || true
Expand Down
7 changes: 6 additions & 1 deletion scripts/build-preferences.sh
Expand Up @@ -4,10 +4,15 @@
# Builds Ulauncher Preferences UI with nodejs
#############################################
build-preferences () {
set -ex
set -e
if [[ "$1" == '--skip-if-built' ]] && [[ -d data/preferences/dist ]]; then
success "Preferences are already built. Skipping."
return
fi

cd data/preferences

set -x
yarn install
yarn lint
yarn unit
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-targz.sh
Expand Up @@ -13,7 +13,7 @@ build-targz () {

set -ex

./ul build-preferences
./ul build-preferences --skip-if-built

name="ulauncher"
tmpdir="/tmp/$name"
Expand Down
2 changes: 1 addition & 1 deletion scripts/run-ci.sh
Expand Up @@ -6,7 +6,7 @@ run-ci () {
step1="ln -s /var/node_modules data/preferences" # take node modules from cache
step2="cd docs && sphinx-apidoc -d 5 -o source ../ulauncher && make html && cd .."
step3="./ul test"
step4="./ul build-preferences"
step4="./ul build-preferences --skip-if-built"

exec docker run \
--rm \
Expand Down
2 changes: 1 addition & 1 deletion ul
Expand Up @@ -41,7 +41,7 @@ main () {
aur-update) ./scripts/aur-update.py $2 ;;
create-build-images) create-build-images ;;
build-doc) build-doc ;;
build-preferences) build-preferences ;;
build-preferences) build-preferences $2 ;;
make-release) make-release $2 ;;
travis-cli-container) travis-cli-container ;;
run-ci) run-ci ;;
Expand Down

0 comments on commit 4d08bc5

Please sign in to comment.