Browse Source

增加修改资源版本功能

dev-opt-homepage
chenzhihang 7 months ago
parent
commit
49eaf6f783
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java

+ 3
- 2
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java View File

@@ -868,9 +868,10 @@ public class ModelsServiceImpl implements ModelsService {
String repositoryName = modelsVo.getIdentifier();
String branchName = modelsVo.getVersion();
String relatePath = ci4sUsername + "/model/" + modelsVo.getId() + "/" + repositoryName + "/" + branchName + "/metadata";
String metaPath = localPath + relatePath;
String rootPath = localPath + relatePath;
String metaPath = rootPath + "/metadata";
YamlUtils.generateYamlFile(JsonUtils.objectToMap(modelsVo), metaPath, "metadata");
dvcUtils.pushNewBranchToRemote(metaPath, gitLinkUsername, gitLinkPassword, branchName);
dvcUtils.pushNewBranchToRemote(rootPath, gitLinkUsername, gitLinkPassword, branchName);
return "更新模型版本成功";
}



Loading…
Cancel
Save