#!/bin/sh
# This is a comment!

#cannot use variations. config.variations should NOT have more than 4 items!! WT

# echo "--------------------------EN Push Begin--------------------------"
cp ./STENCIL_KEYS/config.stencil-eu.json config.stencil.json;
cp ./STENCIL_KEYS/secrets.stencil-eu.json secrets.stencil.json;
cp ./STENCIL_KEYS/.stencil-eu .stencil;
stencil pull;
stencil push -a -d;
# echo "--------------------------EN Push Finished--------------------------"

# echo "--------------------------EN Sandbox Push Begin--------------------------"
cp ./STENCIL_KEYS_SANDBOX/config.stencil-eu.json config.stencil.json;
cp ./STENCIL_KEYS_SANDBOX/secrets.stencil-eu.json secrets.stencil.json;
cp ./STENCIL_KEYS_SANDBOX/.stencil-eu .stencil;
#stencil pull
stencil push -a -d;
# echo "--------------------------EN Sandbox Push Finished--------------------------"




# echo "--------------------------DE Push Begin--------------------------"
cp ./STENCIL_KEYS/config.stencil-de.json config.stencil.json;
cp ./STENCIL_KEYS/secrets.stencil-de.json secrets.stencil.json;
cp ./STENCIL_KEYS/.stencil-de .stencil;
stencil pull;
stencil push -a -d;
# echo "--------------------------DE Push Finished--------------------------"

# echo "--------------------------DE Sandbox Push Begin--------------------------"
cp ./STENCIL_KEYS_SANDBOX/config.stencil-de.json config.stencil.json
cp ./STENCIL_KEYS_SANDBOX/secrets.stencil-de.json secrets.stencil.json
cp ./STENCIL_KEYS_SANDBOX/.stencil-de .stencil
#stencil pull
stencil push -a -d
# echo "--------------------------DE Sandbox Push Finished--------------------------"




# echo "--------------------------FR Push Begin--------------------------"
cp ./STENCIL_KEYS/config.stencil-fr.json config.stencil.json;
cp ./STENCIL_KEYS/secrets.stencil-fr.json secrets.stencil.json;
cp ./STENCIL_KEYS/.stencil-fr .stencil;
stencil pull;
stencil push -a -d;
# echo "--------------------------FR Push Finished--------------------------"

# echo "--------------------------FR Sandbox Push Begin--------------------------"
cp ./STENCIL_KEYS_SANDBOX/config.stencil-fr.json config.stencil.json
cp ./STENCIL_KEYS_SANDBOX/secrets.stencil-fr.json secrets.stencil.json
cp ./STENCIL_KEYS_SANDBOX/.stencil-fr .stencil
#stencil pull
stencil push -a -d
# echo "--------------------------FR Sandbox Push Finished--------------------------"





# echo "--------------------------ES Push Begin--------------------------"
cp ./STENCIL_KEYS/config.stencil-es.json config.stencil.json;
cp ./STENCIL_KEYS/secrets.stencil-es.json secrets.stencil.json;
cp ./STENCIL_KEYS/.stencil-es .stencil;
stencil pull;
stencil push -a -d;
# echo "--------------------------ES Push Finished--------------------------"

# echo "--------------------------ES Sandbox Push Begin--------------------------"
cp ./STENCIL_KEYS_SANDBOX/config.stencil-es.json config.stencil.json
cp ./STENCIL_KEYS_SANDBOX/secrets.stencil-es.json secrets.stencil.json
cp ./STENCIL_KEYS_SANDBOX/.stencil-es .stencil
#stencil pull
stencil push -a -d
# echo "--------------------------ES Sandbox Push Finished--------------------------"




# echo "--------------------------IT Push Begin--------------------------"
cp ./STENCIL_KEYS/config.stencil-it.json config.stencil.json;
cp ./STENCIL_KEYS/secrets.stencil-it.json secrets.stencil.json;
cp ./STENCIL_KEYS/.stencil-it .stencil;
stencil pull;
stencil push -a -d;
# echo "--------------------------IT Push Finished--------------------------"

# echo "--------------------------IT Sandbox Push Begin--------------------------"
cp ./STENCIL_KEYS_SANDBOX/config.stencil-it.json config.stencil.json
cp ./STENCIL_KEYS_SANDBOX/secrets.stencil-it.json secrets.stencil.json
cp ./STENCIL_KEYS_SANDBOX/.stencil-it .stencil
#stencil pull
stencil push -a -d
# echo "--------------------------IT Sandbox Push Finished--------------------------"



# echo "--------------------------NL Push Begin--------------------------"
cp ./STENCIL_KEYS/config.stencil-nl.json config.stencil.json;
cp ./STENCIL_KEYS/secrets.stencil-nl.json secrets.stencil.json;
cp ./STENCIL_KEYS/.stencil-nl .stencil;
stencil pull;
stencil push -a -d;
# echo "--------------------------NL Push Finished--------------------------"

# echo "--------------------------NL Sandbox Push Begin--------------------------"
cp ./STENCIL_KEYS_SANDBOX/config.stencil-nl.json config.stencil.json
cp ./STENCIL_KEYS_SANDBOX/secrets.stencil-nl.json secrets.stencil.json
cp ./STENCIL_KEYS_SANDBOX/.stencil-nl .stencil
#stencil pull
stencil push -a -d
# echo "--------------------------NL Sandbox Push Finished--------------------------"








echo "--------------------------US Push Begin--------------------------"
cp ./STENCIL_KEYS/config.stencil-us.json config.stencil.json
cp ./STENCIL_KEYS/secrets.stencil-us.json secrets.stencil.json
cp ./STENCIL_KEYS/.stencil-us .stencil
stencil pull;
stencil push -a US -d
echo "--------------------------US Push Finished--------------------------"

echo "--------------------------US Sandbox Push Begin--------------------------"
cp ./STENCIL_KEYS_SANDBOX/config.stencil-us.json config.stencil.json;
cp ./STENCIL_KEYS_SANDBOX/secrets.stencil-us.json secrets.stencil.json;
cp ./STENCIL_KEYS_SANDBOX/.stencil-us .stencil;
stencil push -a US -d;
echo "--------------------------US Sandbox Push Finished--------------------------"






# echo "--------------------------Set the config file back--------------------------"
cp ./STENCIL_KEYS/config.stencil-eu.json config.stencil.json
cp ./STENCIL_KEYS/secrets.stencil-eu.json secrets.stencil.json
cp ./STENCIL_KEYS/.stencil-eu .stencil
# echo "--------------------------Set the config file back Finished--------------------------"






