Archived
feat: dynamic version from Maven resource filtering
- Add VersionProvider class that reads version from version.properties - Enable Maven resource filtering for version.properties - Version is now automatically synced with pom.xml Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a72dfd2e4c
commit
6b28dca798
8 files changed
+86
-3
No files matched your search
@@ -0,0 +1,23 @@
|
||||
package com.samsonmedia.barn.cli;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class VersionProviderTest {
|
||||
|
||||
@Test
|
||||
void getVersion_shouldReturnVersionFromProperties() {
|
||||
// Arrange
|
||||
var provider = new VersionProvider();
|
||||
|
||||
// Act
|
||||
String[] version = provider.getVersion();
|
||||
|
||||
// Assert
|
||||
assertThat(version).hasSize(1);
|
||||
assertThat(version[0]).startsWith("barn ");
|
||||
assertThat(version[0]).doesNotContain("unknown");
|
||||
assertThat(version[0]).doesNotContain("${");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user