From bfe53c60db12e2314d15386a81effeeaa79ac9d7 Mon Sep 17 00:00:00 2001 From: Harry Date: Sun, 8 Dec 2024 18:20:16 -0800 Subject: [PATCH] Test --- .github/workflows/post_release_version_bump.yml | 4 ++-- .../providers/{Version.java => ArtifactVersion.java} | 12 +++--------- 2 files changed, 5 insertions(+), 11 deletions(-) rename awsagentprovider/src/main/java/software/amazon/opentelemetry/javaagent/providers/{Version.java => ArtifactVersion.java} (71%) diff --git a/.github/workflows/post_release_version_bump.yml b/.github/workflows/post_release_version_bump.yml index dfd841d9e3..2035bb69ce 100644 --- a/.github/workflows/post_release_version_bump.yml +++ b/.github/workflows/post_release_version_bump.yml @@ -34,7 +34,7 @@ jobs: - name: Get current major.minor version from main branch id: get_version run: | - CURRENT_VERSION=$(grep 'public static String VERSION' awsagentprovider/src/main/java/software/amazon/opentelemetry/javaagent/providers/Version.java | sed -E 's/ public static String VERSION = "([0-9]+\.[0-9]+)\.[0-9]+.*";/\1/') + CURRENT_VERSION=$(grep 'public final String VERSION' awsagentprovider/src/main/java/software/amazon/opentelemetry/javaagent/providers/ArtifactVersion.java | sed -E 's/ public final String VERSION = "([0-9]+\.[0-9]+)\.[0-9]+.*";/\1/') echo "CURRENT_MAJOR_MINOR_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV - name: Set major and minor for current version @@ -98,7 +98,7 @@ jobs: - name: Update version to next development version in main run: | DEV_VERSION="1.32.7.dev0" - sed -i "s/public static String VERSION = \".*\";/public static String VERSION = \"${DEV_VERSION}\";/" awsagentprovider/src/main/java/software/amazon/opentelemetry/javaagent/providers/Version.java + sed -i "s/public final String VERSION = \".*\";/public final String VERSION = \"${DEV_VERSION}\";/" awsagentprovider/src/main/java/software/amazon/opentelemetry/javaagent/providers/ArtifactVersion.java VERSION="1.32.7" git add awsagentprovider/src/main/java/software/amazon/opentelemetry/javaagent/providers/Version.java diff --git a/awsagentprovider/src/main/java/software/amazon/opentelemetry/javaagent/providers/Version.java b/awsagentprovider/src/main/java/software/amazon/opentelemetry/javaagent/providers/ArtifactVersion.java similarity index 71% rename from awsagentprovider/src/main/java/software/amazon/opentelemetry/javaagent/providers/Version.java rename to awsagentprovider/src/main/java/software/amazon/opentelemetry/javaagent/providers/ArtifactVersion.java index aa122d52c2..ef93b91cca 100644 --- a/awsagentprovider/src/main/java/software/amazon/opentelemetry/javaagent/providers/Version.java +++ b/awsagentprovider/src/main/java/software/amazon/opentelemetry/javaagent/providers/ArtifactVersion.java @@ -15,12 +15,6 @@ package software.amazon.opentelemetry.javaagent.providers; -import io.opentelemetry.api.common.AttributeKey; - -/** Utility class holding attribute keys with special meaning to AWS components */ -final class AwsAttributeKeys { - - private AwsAttributeKeys() {} - - public static VERSION = "1.32.5.dev0"; -} +public final class ArtifactVersion { + public final String VERSION = "1.32.5.dev0"; +} \ No newline at end of file