Skip to content

Commit 93601e4

Browse files
committed
Merge branch 'master' into stable
2 parents 7f0ca28 + 06884a7 commit 93601e4

File tree

3 files changed

+88
-6
lines changed

3 files changed

+88
-6
lines changed

eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn.Integration.Test/BackendConfiguration.Pn.Integration.Test.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
<ItemGroup>
1313
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
1414
<PackageReference Include="NSubstitute" Version="5.3.0" />
15-
<PackageReference Include="NUnit" Version="4.3.2" />
16-
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0" />
17-
<PackageReference Include="NUnit.Analyzers" Version="4.9.2">
15+
<PackageReference Include="NUnit" Version="4.4.0" />
16+
<PackageReference Include="NUnit3TestAdapter" Version="5.1.0" />
17+
<PackageReference Include="NUnit.Analyzers" Version="4.10.0">
1818
<PrivateAssets>all</PrivateAssets>
1919
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2020
</PackageReference>

eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn.Test/BackendConfiguration.Pn.Test.csproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@
1010
<ItemGroup>
1111
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
1212
<PackageReference Include="NSubstitute" Version="5.3.0" />
13-
<PackageReference Include="NUnit" Version="4.3.2" />
14-
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0" />
13+
<PackageReference Include="NUnit" Version="4.4.0" />
14+
<PackageReference Include="NUnit.Analyzers" Version="4.10.0">
15+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
16+
<PrivateAssets>all</PrivateAssets>
17+
</PackageReference>
18+
<PackageReference Include="NUnit3TestAdapter" Version="5.1.0" />
1519
<PackageReference Include="Testcontainers" Version="4.7.0" />
1620
<PackageReference Include="Testcontainers.MariaDb" Version="4.7.0" />
1721
</ItemGroup>

upgradeeformnugets.sh

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ GIT_STATUS=`git status | grep "nothing to commit, working tree clean" | wc -l`
44
if (( "$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

Comments
 (0)