Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F61871271
test_repo.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, May 9, 12:12
Size
618 B
Mime Type
text/x-shellscript
Expires
Sat, May 11, 12:12 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
17570166
Attached To
rPHINFRA c4science
test_repo.sh
View Options
#!/bin/bash -e
WORKDIR='/tmp'
LOGFILE='/tmp/test_repo.log'
error() {
cat $LOGFILE | mail -s "Error $1" jean-baptiste.aubort@epfl.ch
}
clean() {
rm -fr $WORKDIR/PHTEST
}
test_clone() {
cd $WORKDIR
git clone ssh://git@c4science.ch/source/phtest.git PHTEST
cd PHTEST
git config user.name 'c4science bot'
git config user.email 'bot@c4science.ch'
}
test_push() {
cd $WORKDIR/PHTEST
echo test >> README.md
git add README.md
git commit -m "Testing..."
git push origin master
}
exec 2>> $LOGFILE
date >> $LOGFILE
clean
test_clone || error clone
test_push || error push
Event Timeline
Log In to Comment