2020-12-04 12:46:30 -06:00
|
|
|
#!/bin/bash
|
|
|
|
# This script runs after the prechecks and before the deployment
|
|
|
|
# In the host enviroment (All the GITHUB variables are available)
|
2020-12-04 01:18:22 -06:00
|
|
|
|
2020-12-04 12:46:30 -06:00
|
|
|
# Working directory in github workspace
|
|
|
|
# Original repo is places SOFA-Chips
|
|
|
|
# for conditional file copy use PROJ_SUFFIX (example SOFA_HD)
|
2020-12-04 01:18:22 -06:00
|
|
|
|
2020-12-04 12:46:30 -06:00
|
|
|
tail -n +2 ./SOFA-Chips/SynRepoConfig/sync_files.csv | while IFS=, read -r srcLoc dstLoc; do
|
|
|
|
Copying "./SOFA-Chips/$srcLoc --> ${DEST_DIR}/$dstLoc"
|
|
|
|
rsync -avp ./SOFA-Chips/$srcLoc ${DEST_DIR}/$dstLoc
|
|
|
|
done
|
2020-12-04 01:18:22 -06:00
|
|
|
|
2020-12-04 12:46:30 -06:00
|
|
|
cd ${DEST_DIR}
|
2020-12-04 01:18:22 -06:00
|
|
|
|
2020-12-04 12:46:30 -06:00
|
|
|
[ -s source_commit_hash.txt ] || echo "----------" > source_commit_hash.txt
|
|
|
|
sed -i -e "s/^/\n/" source_commit_hash.txt
|
|
|
|
sed -i -e "s/^/${GITHUB_SHA}\n/" source_commit_hash.txt
|
|
|
|
sed -i -e "s/^/$(date)\n/" source_commit_hash.txt
|