@@ -4,9 +4,9 @@ GIT_STATUS=`git status | grep "nothing to commit, working tree clean" | wc -l`
44if (( "$GIT_STATUS " > 0 )) ; then
55 git checkout master
66 git pull
7- cd eFormAPI/Plugins/GreateBelt.Pn/GreateBelt.Pn
87 CURRENT_NUMBER_OF_COMMITS=` git log --oneline | wc -l`
98
9+ cd eFormAPI/Plugins/GreateBelt.Pn/GreateBelt.Pn
1010 PACKAGES=(' Microting.eForm' ' Microting.eFormApi.BasePn' ' Microting.ItemsPlanningBase' ' Sentry' )
1111 PROJECT_NAME=' GreateBelt.Pn.csproj'
1212 REPOSITORY=' eform-angular-greate-belt-plugin'
@@ -42,6 +42,45 @@ if (( "$GIT_STATUS" > 0 )); then
4242 git commit -a -m " closes #$ISSUE_NUMBER "
4343 fi
4444 done
45+
46+ cd ..
47+ cd GreateBelt.Pn.Test
48+ PACKAGES=(' Microsoft.NET.Test.Sdk' ' NSubstitute' ' NUnit' ' NUnit3TestAdapter' ' NUnit.Analyzers' ' Testcontainers' ' Testcontainers.Mariadb' )
49+ PROJECT_NAME=' GreateBelt.Pn.Test.csproj'
50+ REPOSITORY=' eform-angular-greate-belt-plugin'
51+
52+ for PACKAGE_NAME in ${PACKAGES[@]} ; do
53+
54+ OLD_VERSION=` dotnet list package | grep " $PACKAGE_NAME " | grep -oP ' \d\.\d+\.\d.*' | grep -oP ' \d.* \b' | xargs`
55+
56+ dotnet add $PROJECT_NAME package $PACKAGE_NAME
57+
58+ NEW_VERSION=` dotnet list package | grep " $PACKAGE_NAME " | grep -oP ' \d\.\d+\.\d.*$' | grep -oP ' \d\.\d+\.\d.*$' | grep -oP ' \d\.\d+\.\d.*$' | xargs`
59+
60+ if [ $NEW_VERSION != $OLD_VERSION ]; then
61+ echo " We have a new version of $PACKAGE_NAME , so creating github issue and do a commit message to close that said issue"
62+ RESULT=` curl -X " POST" " https://api.github.com/repos/microting/$REPOSITORY /issues?state=all" \
63+ -H " Cookie: logged_in=no" \
64+ -H " Authorization: token $CHANGELOG_GITHUB_TOKEN " \
65+ -H " Content-Type: text/plain; charset=utf-8" \
66+ -d $' {
67+ "title": "Bump ' $PACKAGE_NAME ' from ' $OLD_VERSION ' to ' $NEW_VERSION ' ",
68+ "body": "TBD",
69+ "assignees": [
70+ "renemadsen"
71+ ],
72+ "labels": [
73+ ".NET",
74+ "backend",
75+ "enhancement"
76+ ]
77+ }' `
78+ ISSUE_NUMBER=` echo $RESULT | grep -oP ' number": \d+,' | grep -oP ' \d+' `
79+ git add .
80+ git commit -a -m " closes #$ISSUE_NUMBER "
81+ fi
82+ done
83+
4584 NEW_NUMBER_OF_COMMITS=` git log --oneline | wc -l`
4685
4786 if (( $NEW_NUMBER_OF_COMMITS > $CURRENT_NUMBER_OF_COMMITS )) ; then
0 commit comments