@@ -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/BackendConfiguration.Pn/BackendConfiguration.Pn
87 CURRENT_NUMBER_OF_COMMITS=` git log --oneline | wc -l`
98
9+ cd eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn
1010 PACKAGES=(' Microting.eForm' ' Microting.eFormApi.BasePn' ' Microting.EformBackendConfigurationBase' ' Microting.ItemsPlanningBase' ' Microting.TimePlanningBase' ' Microting.EformAngularFrontendBase' ' Microting.eFormCaseTemplateBase' ' Google.Apis.Sheets.v4' ' Sentry' )
1111 PROJECT_NAME=' BackendConfiguration.Pn.csproj'
1212 REPOSITORY=' eform-angular-backendconfiguration-plugin'
@@ -42,6 +42,84 @@ if (( "$GIT_STATUS" > 0 )); then
4242 git commit -a -m " closes #$ISSUE_NUMBER "
4343 fi
4444 done
45+
46+ cd ..
47+ cd BackendConfiguration.Pn.Integration.Test
48+ PACKAGES=(' Microsoft.NET.Test.Sdk' ' NSubstitute' ' NUnit' ' NUnit3TestAdapter' ' NUnit.Analyzers' ' Testcontainers' ' Testcontainers.Mariadb' )
49+ PROJECT_NAME=' BackendConfiguration.Pn.Integration.Test.csproj'
50+ REPOSITORY=' eform-angular-backendconfiguration-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+
84+
85+ cd ..
86+ cd BackendConfiguration.Pn.Test
87+ PACKAGES=(' Microsoft.NET.Test.Sdk' ' NSubstitute' ' NUnit' ' NUnit3TestAdapter' ' NUnit.Analyzers' ' Testcontainers' ' Testcontainers.Mariadb' )
88+ PROJECT_NAME=' BackendConfiguration.Pn.Test.csproj'
89+ REPOSITORY=' eform-angular-backendconfiguration-plugin'
90+
91+ for PACKAGE_NAME in ${PACKAGES[@]} ; do
92+
93+ OLD_VERSION=` dotnet list package | grep " $PACKAGE_NAME " | grep -oP ' \d\.\d+\.\d.*' | grep -oP ' \d.* \b' | xargs`
94+
95+ dotnet add $PROJECT_NAME package $PACKAGE_NAME
96+
97+ NEW_VERSION=` dotnet list package | grep " $PACKAGE_NAME " | grep -oP ' \d\.\d+\.\d.*$' | grep -oP ' \d\.\d+\.\d.*$' | grep -oP ' \d\.\d+\.\d.*$' | xargs`
98+
99+ if [ $NEW_VERSION != $OLD_VERSION ]; then
100+ echo " We have a new version of $PACKAGE_NAME , so creating github issue and do a commit message to close that said issue"
101+ RESULT=` curl -X " POST" " https://api.github.com/repos/microting/$REPOSITORY /issues?state=all" \
102+ -H " Cookie: logged_in=no" \
103+ -H " Authorization: token $CHANGELOG_GITHUB_TOKEN " \
104+ -H " Content-Type: text/plain; charset=utf-8" \
105+ -d $' {
106+ "title": "Bump ' $PACKAGE_NAME ' from ' $OLD_VERSION ' to ' $NEW_VERSION ' ",
107+ "body": "TBD",
108+ "assignees": [
109+ "renemadsen"
110+ ],
111+ "labels": [
112+ ".NET",
113+ "backend",
114+ "enhancement"
115+ ]
116+ }' `
117+ ISSUE_NUMBER=` echo $RESULT | grep -oP ' number": \d+,' | grep -oP ' \d+' `
118+ git add .
119+ git commit -a -m " closes #$ISSUE_NUMBER "
120+ fi
121+ done
122+
45123 NEW_NUMBER_OF_COMMITS=` git log --oneline | wc -l`
46124
47125 if (( $NEW_NUMBER_OF_COMMITS > $CURRENT_NUMBER_OF_COMMITS )) ; then
0 commit comments