wfansh 6 місяців тому
батько
коміт
2182277091

+ 11 - 0
src/main/java/com/wechi/adweb/bridge/google/gtm/service/GTMService.java

@@ -343,4 +343,15 @@ public class GTMService {
             throw new DataException(e);
         }
     }
+
+    @VisibleForTesting
+    void publishContainerVersion(String versionResourceName) throws Exception {
+        try {
+            tagManager.accounts().containers().versions().publish(versionResourceName).execute();
+            log.info("Published container version {}", JsonUtils.toJson(versionResourceName));
+        } catch (IOException e) {
+            log.error(e.getMessage());
+            throw new DataException(e);
+        }
+    }
 }