Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: hard coded version string updated by release-please #162

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"pom.xml",
"README.md",
"openfeature-provider/pom.xml",
"sdk-java/pom.xml"
"sdk-java/pom.xml",
"sdk-java/src/main/java/com/spotify/confidence/ConfidenceUtils.java"
],
"changelog-sections": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
import com.spotify.confidence.ConfidenceValue.Struct;
import com.spotify.confidence.Exceptions.IllegalValuePath;
import com.spotify.confidence.Exceptions.ValueNotFound;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.Properties;
import java.util.regex.Pattern;
import org.slf4j.Logger;

// Be careful if you intend moving this file. The version returned by `getSdkVersion()` is set by
// Release Please by defining its path as an "extra file" in release-please-config.json
final class ConfidenceUtils {

private ConfidenceUtils() {}
Expand Down Expand Up @@ -85,12 +85,6 @@ public static FlagPath getPath(String str) throws IllegalValuePath {
}

static String getSdkVersion() {
try {
final Properties prop = new Properties();
prop.load(ConfidenceUtils.class.getResourceAsStream("/version.properties"));
return prop.getProperty("version");
} catch (IOException e) {
throw new RuntimeException("Can't determine version of the SDK", e);
}
return "0.1.3-SNAPSHOT"; // x-release-please-version
}
}
1 change: 0 additions & 1 deletion sdk-java/src/main/resources/version.properties

This file was deleted.