43 lines
1.2 KiB
Bash
43 lines
1.2 KiB
Bash
#!/bin/bash
|
|
# This script replaces all references to the development version with the test version
|
|
# 1) Database references and paths
|
|
|
|
git grep -I "connection_data_test.json"
|
|
git grep -I "/var/www/brecal_test/"
|
|
|
|
# 2) Color references
|
|
# Bar colors in client: (BG_COLOR)
|
|
# Devel: #1D751F
|
|
# Test: #751D1F
|
|
# Prod: #203864
|
|
|
|
git grep -I "#751D1F"
|
|
|
|
# 3) Assembly name references
|
|
|
|
git grep -I "BreCalTestClient"
|
|
|
|
echo "Proceed? [N/y]"
|
|
read proceed
|
|
|
|
# for color
|
|
|
|
if [ "${proceed}" = "y" ]; then
|
|
|
|
# 1. for database references and paths
|
|
git grep -I "connection_data_test.json" | xargs sed --in-place -e "s/connection_data_test.json/connection_data_prod.json/g"
|
|
git add $(git grep -I "connection_data_prod.json")
|
|
git grep -I "/var/www/brecal_test/" | xargs sed --in-place -e "s/\/var\/www\/brecal_test\//\/var\/www\/brecal\//g"
|
|
git add $(git grep -I "/var/www/brecal/")
|
|
|
|
# 2. for color
|
|
git grep -Il "#751D1F" | xargs sed --in-place -e "s/#751D1F/#203864/g"
|
|
git add $(git grep -Il "#203864")
|
|
|
|
# 3. for assembly name
|
|
|
|
git grep -I "BreCalTestClient" | xargs sed --in-place -e "s/BreCalTestClient/BreCalClient/g"
|
|
git add $(git grep -I "BreCalClient")
|
|
|
|
fi
|