mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
20 lines
613 B
Bash
Executable File
20 lines
613 B
Bash
Executable File
# Check if the CodeExamples.md file has been changed
|
|
original=$(md5sum CodeExamples.md)
|
|
echo $original
|
|
npm run create:guide
|
|
new=$(md5sum CodeExamples.md)
|
|
echo $new
|
|
|
|
# Check if file has changed
|
|
if [ "$new" = "$original" ]; then
|
|
echo "CodeExamples.md file has not been changed"
|
|
else
|
|
echo "CodeExamples.md file has been changed. Committing changes"
|
|
# Stage the file, commit and push
|
|
git status
|
|
git add CodeExamples.md
|
|
git commit -m "Updating CodeExamples.md"
|
|
branch=${GITHUB_HEAD_REF#refs/heads/}
|
|
echo Pushing changes to branch: ${branch}
|
|
git push origin HEAD:${branch} --force
|
|
fi |