wfansh 6 月之前
父節點
當前提交
2182277091
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11 0
      src/main/java/com/wechi/adweb/bridge/google/gtm/service/GTMService.java

+ 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);
+        }
+    }
 }