Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Hedtke, Moritz
AuD 2021 H05 Tests
Commits
95d99556
Verified
Commit
95d99556
authored
Jun 12, 2021
by
Daniel Mangold
Browse files
Changed .test_version syntax to allow a custom message to be printed on update
parent
d7633d54
Changes
1
Show whitespace changes
Inline
Side-by-side
src/test/java/h05/Utils.java
View file @
95d99556
...
@@ -205,12 +205,14 @@ public class Utils {
...
@@ -205,12 +205,14 @@ public class Utils {
}
}
try
(
BufferedReader
remoteReader
=
new
BufferedReader
(
new
StringReader
(
response
.
body
())))
{
try
(
BufferedReader
remoteReader
=
new
BufferedReader
(
new
StringReader
(
response
.
body
())))
{
String
[]
versionLine
=
remoteReader
.
readLine
().
split
(
" -- "
,
2
);
Version
localVersion
=
new
Version
(
LOCAL_VERSION
),
Version
localVersion
=
new
Version
(
LOCAL_VERSION
),
remoteVersion
=
new
Version
(
remoteReader
.
read
Line
()
);
remoteVersion
=
new
Version
(
version
Line
[
0
]
);
if
(
remoteVersion
.
compareTo
(
localVersion
)
>
0
)
{
if
(
remoteVersion
.
compareTo
(
localVersion
)
>
0
)
{
System
.
out
.
println
(
"Update available! Local version: "
+
localVersion
+
" -- Remote version: "
+
remoteVersion
);
System
.
out
.
println
(
"Update available! Local version: "
+
localVersion
+
" -- Remote version: "
+
remoteVersion
);
System
.
out
.
println
(
"Changelog: "
+
REPOSITORY_URL
+
"blob/master/changelog.md"
);
System
.
out
.
println
(
"Changelog: "
+
REPOSITORY_URL
+
"blob/master/changelog.md"
);
System
.
out
.
println
(
versionLine
[
1
]);
}
else
}
else
System
.
out
.
println
(
"Local tests are up to date"
);
System
.
out
.
println
(
"Local tests are up to date"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment