openapi-generator/bin/ensure-up-to-date
Jérémie Bresson 00f176ad95 Add 'bin/ensure-up-to-date' script and update Shippable CI (#136)
* Create 'bin/ensure-up-to-date' script

* Update shippable config

* Do no longer copy 'CI/pom.xml.shippable' to 'pom.xml'
* Fix paths in CI/pom.xml.shippable

* shippable: remove write to file

* shippable: move order

* Run 'bin/ruby-petstore.sh' to update 'samples/'

* Add Kotlin scripts to the list
2018-05-24 10:18:35 -04:00

31 lines
943 B
Bash
Executable File

#!/bin/bash
# this bash script run the scripts for the 'mature' generators
# it ensures that all changes are commited into the 'samples/' folder
echo "# START SCRIPT: $0"
echo "IMPORTANT: this script should be run by the CI (e.g. Shippable) to ensure that the 'samples/' folder is up to date."
echo "Please press CTRL+C to stop or the script will continue in 5 seconds."
sleep 5
# LIST OF SCRIPTS:
./bin/ruby-petstore.sh
./bin/java-petstore-all.sh
./bin/spring-all-pestore.sh
./bin/kotlin-client-petstore.sh
./bin/kotlin-client-string.sh
./bin/kotlin-client-threetenbp.sh
./bin/kotlin-server-petstore.sh
# Check:
if [ -n "$(git status --porcelain)" ]; then
echo "UNCOMMITTED CHANGES ERROR"
echo "There are uncommitted changes in working tree after execution of 'bin/ensure-up-to-date'"
git status
echo "Please run 'bin/ensure-up-to-date' locally and commit changes"
exit 1
else
echo "Git working tree is clean"
fi