Selaa lähdekoodia

Convert rebuild.sh script from bash to sh

Danilo Bargen 6 vuotta sitten
vanhempi
commit
4abe339744
2 muutettua tiedostoa jossa 6 lisäystä ja 4 poistoa
  1. 2 2
      .circleci/config.yml
  2. 4 2
      docker/rebuild.sh

+ 2 - 2
.circleci/config.yml

@@ -91,7 +91,7 @@ jobs:
     steps:
       - checkout
       - setup_remote_docker
-      - run: bash docker/rebuild.sh
+      - run: /bin/sh docker/rebuild.sh
 
 
 workflows:
@@ -118,7 +118,7 @@ workflows:
   weekly:
     triggers:
       - schedule:
-          cron: "45 14 * * 4"
+          cron: "58 14 * * 4"
           filters:
             branches:
               only:

+ 4 - 2
docker/rebuild.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # Rebuild and publish all docker images.
 # Use the --dry-run argument to prevent the actual build process from running.
@@ -10,6 +10,8 @@
 # - `DOCKER_USER`
 # - `DOCKER_API_KEY`
 
+set -euo pipefail
+
 SUPPORTED_BRANCH_NAMES=("master")
 SUPPORTED_TAG_PATTERNS=("^v2.1.\([6789]\|1[0-9]\)$")
 IMAGE_NAME=threema/threema-web
@@ -25,7 +27,7 @@ echo "Logging in..."
 $DOCKER login -u $DOCKER_USER -p $DOCKER_API_KEY
 
 echo "Create temporary directory..."
-mkdir builds
+mkdir -p builds
 
 echo -e "\nBuilding branches:"
 for branch in $SUPPORTED_BRANCH_NAMES; do