Skip to content

Commit

Permalink
Update nflow-examples version numbers after release and check that th…
Browse files Browse the repository at this point in the history
…eir build works
  • Loading branch information
eputtone committed Feb 11, 2021
1 parent 2242f6a commit 66bd785
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
46 changes: 46 additions & 0 deletions nflow-examples/build_examples.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash

cd spring-boot/bare-minimum/maven

if mvn install; then
echo "Spring Boot bare minimum Maven builds ok"
else
echo "Spring Boot bare minimum Maven build failed"
exit 1
fi

cd ../gradle

if ./gradlew build; then
echo "Spring Boot bare minimum Gradle builds ok"
else
echo "Spring Boot bare minimum Gradle build failed"
exit 1
fi

cd ../../full-stack/maven

if mvn install; then
echo "Spring Boot full stack Maven builds ok"
else
echo "Spring Boot full stack Maven build failed"
exit 1
fi

cd ../gradle

if ./gradlew build; then
echo "Spring Boot full stack Gradle builds ok"
else
echo "Spring Boot full stack Gradle build failed"
exit 1
fi

cd ../../full-stack-kotlin

if ./gradlew build; then
echo "Spring Boot Kotlin Gradle builds ok"
else
echo "Spring Boot Kotlin Gradle build failed"
exit 1
fi
29 changes: 29 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,32 @@ if mkdir -p "$NFLOW_WIKI_CHECKOUT_DIR" ; then
else
echo "failed to update version number in nFlow Wiki pages - do it manually"
fi

prompt_continue "updating nflow-examples dependencies to new release and verifying that their build works"

EXAMPLE_DEPENDENCY_FILES=("bare-minimum/maven/pom.xml" "bare-minimum/gradle/build.gradle" "full-stack/maven/pom.xml" "full-stack/gradle/build.gradle" "full-stack-kotlin/gradle.properties")

cd nflow-examples

for dependency_file in "${EXAMPLE_DEPENDENCY_FILES[@]}"; do
sed -i -e "s/$PREVIOUS_VERSION/$RELEASE_VERSION/g" "spring-boot/$dependency_file"
done

if ./build_examples.sh; then
echo "changed nflow-examples files:"
git --no-pager diff

for dependency_file in "${EXAMPLE_DEPENDENCY_FILES[@]}"; do
git add "spring-boot/$dependency_file"
done
git commit -m "updated nflow-examples for version $RELEASE_VERSION"

prompt_continue "push version nflow-example to remote git repository"
git push
else
echo "failed to build nflow-examples - check manually what is wrong"
fi

cd "$RELEASE_DIR"

echo "*** RELEASE FINISHED ***"

0 comments on commit 66bd785

Please sign in to comment.