标签: versioning

如何从 Amazon S3 下载包含 100,000 多个版本的文件的所有版本?

我在 Windows 上使用 AWS 命令​​行,到目前为止我发现的所有方法似乎都表明我需要获取所有对象的版本 ID 列表。我可以使用某种通配符(如 *)吗?

versioning versions amazon-s3 amazon-web-services

4
推荐指数
1
解决办法
2575
查看次数

语义版本修补协议:如果依赖项发生冲突,您是否会发生冲突?

我有一个具有固定依赖项的python 项目。由于第三方依赖项中的错误,在我的包中发现了错误。该依赖项已发布修复该错误的补丁。然而,根据语义版本控制,是否有协议为固定依赖项的每个补丁版本发布并发布一个版本?

versioning dependencies semantic-versioning

4
推荐指数
1
解决办法
1660
查看次数

如何在gradle中阅读`minSdkVersion`?

我设定minSdkVersion了风味:

android {
 buildTypes {
    release {
    }

    debug {
        debuggable true
    }

    productFlavors {
            myFlavor {
                minSdkVersion 19
            }
        }
}
Run Code Online (Sandbox Code Playgroud)

据此:

在此处输入图片说明

我想构建versionCode,包含minSdkVersion在versionCode:

 applicationVariants.all { variant ->
        // get the version code of each flavor
        variant.mergedFlavor.versionCode =  variant.versionCode * 100000 + minSdkVersion(?) * 1000 + defaultConfig.versionCode
    }
Run Code Online (Sandbox Code Playgroud)

我怎样才能访问minSdkVersion这个脚本?

我试过:

  • variant.minSdkVersion
  • android.minSdkVersion
  • project.minSdkVersion
  • project.android.minSdkVersion

但没有运气。

versioning android gradle android-gradle-plugin

4
推荐指数
1
解决办法
496
查看次数

您可以调用特定版本的 Google Cloud 函数吗?

我们有很多依赖于 Google Cloud Functions 的应用程序 - 并且云函数更新和应用程序更新之间存在异步性。

假设我们先更新云函数,然后应用程序崩溃了。但是,如果我们先更新应用程序,它将无法与当前版本的云功能一起使用。

解决此问题的一种方法是能够指定要执行的云函数版本。这可能吗?

非常感谢!

versioning google-cloud-platform google-cloud-functions

4
推荐指数
1
解决办法
2872
查看次数

如何获得git标签的总数

我想获取存储库中标签计数的总数

该grgit库已经解决了这个问题。

git = org.ajoberstar.grgit.Grgit.open()
git.tag.list().size()
Run Code Online (Sandbox Code Playgroud)

但它在 groovy 中,我想要它的 gradle 版本。

git describe --tags $(git rev-list --tags --count)
Run Code Online (Sandbox Code Playgroud)

上面的代码给出了提交的总数

到目前为止,我有以下代码段可以获取提交的总数。

versionCode = { ->
    try {
        def stdout = new ByteArrayOutputStream()
        exec {
            commandLine 'git', 'rev-list', '--first-parent', '--count', 'HEAD'
            standardOutput = stdout
        }
        return Integer.parseInt(stdout.toString().trim())
    }
    catch (ignored) {
        return -1
    }
}
Run Code Online (Sandbox Code Playgroud)

我已经引用了这个 SO 问题,但没有正确的答案

versioning git gradle android-gradle-plugin

4
推荐指数
1
解决办法
2355
查看次数

Azure Devops yaml dotnet core build /p:Version=1.2.3 始终默认为 csproj 中的版本

我正在尝试通过 Azure DevOps 构建一个 dotnet 核心应用程序。我希望我的程序集使用内部版本号进行版本控制。

在 .csproj 文件中:

<PropertyGroup>
  <TargetFramework>netcoreapp2.2</TargetFramework>
  <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
  <Version>0.0.1</Version>
</PropertyGroup>
Run Code Online (Sandbox Code Playgroud)

yaml 构建管道包含:

trigger:
  branches:
   include:
     - master

pool:
  name: 'Hosted Windows 2019 with VS2019'
  #vmImage: 'ubuntu-latest'

variables:
  buildConfiguration: 'Release'
  Version.Revision: $[counter(format('{0:yyyyMMdd}', pipeline.startTime), 0)]
  VersionMajor: 0
  VersionMinor: 1


name: '$(VersionMajor).$(VersionMinor).$(Date:yy)$(DayOfYear).$(Version.Revision)'

steps:
- task: DotNetCoreInstaller@0
  inputs:
    version: '2.2.300'

- script: dotnet build --configuration Release /p:Version=$(Build.BuildNumber)
  displayName: 'dotnet build $(buildConfiguration) $(Build.BuildNumber)'
Run Code Online (Sandbox Code Playgroud)

在 Azure Devops 构建日志中,该命令似乎选择了正确的版本:

dotnet build --configuration Release /p:Version=0.1.19185.10
Run Code Online (Sandbox Code Playgroud)

但是当我下载工件并验证 dll 时,它们仍然包含版本号 0.0.1

在本地执行此命令会在 dll 中添加版本号。那么,为什么不通过 Azure DevOps …

versioning .net-core azure-devops

4
推荐指数
1
解决办法
891
查看次数

如何在 GitHub 中自动对 Maven 项目进行版本控制?

我正在尝试将自动或半自动版本控制为GitHub.

我研究了自动化发布工作流程的可能性,它似乎并不是GitHub.

我希望pom.xml每当我创建标签GitHub或合并到master分支时自动更新版本。

versioning workflow release github maven

4
推荐指数
1
解决办法
5049
查看次数

即使在增量编译中,SBT 1.3.8 也会自动更新 SNAPSHOT 版本

从 SBT 1.3.0 开始,Coursier 是默认解析器引擎,因此我们从依赖项中删除了 Coursier SBT 插件。

在 Coursier-plugin 时代,我们曾经COURSIER_TTL="5 min"控制过SNAPSHOT自动获取版本的频率,甚至sbt ~test:compile在开发过程中何时使用。

对于依赖SNAPSHOT项目,这里是输出:

sbt:hub> show isSnapshot
[info] common / isSnapshot
[info]  true
[info] isSnapshot
[info]  true
Run Code Online (Sandbox Code Playgroud)
sbt:hub> show packagedArtifacts
[info] Wrote C:\Users\Ehnalis\Projects\hub\common\target\scala-2.12\common_2.12-0.5.0-SN
APSHOT.pom
[info] Wrote C:\Users\Ehnalis\Projects\hub\target\scala-2.12\hub_2.12-0.5.0-SNAPSHOT.pom

[info] common / packagedArtifacts
[info]  Map(Artifact(common, jar, jar, None, Vector(compile), None, Map(), None, false)
-> C:\Users\Ehnalis\Projects\hub\common\target\scala-2.12\common_2.12-0.5.0-SNAPSHOT.jar
, Artifact(common, src, jar, Some(tests-sources), Vector(test), None, Map(), None, false
) -> C:\Users\Ehnalis\Projects\hub\common\target\scala-2.12\common_2.12-0.5.0-SNAPSHOT-t
ests-sources.jar, Artifact(common, jar, jar, Some(tests), Vector(test), …
Run Code Online (Sandbox Code Playgroud)

versioning scala compilation snapshot sbt

4
推荐指数
1
解决办法
508
查看次数

如何使用bump2version创建自定义版本标签

我们使用bump2version来对Gitlab中的构建和发布进行版本控制,使用简单的major.minor.patch(1.1.17)格式。

然而,有时,使用自定义版本格式(例如 1.1.17-test-1)在常规管道之外创建版本很有用。

在当前版本 1.1.17 上尝试使用如下所示的 bubble2versions 命令行标志:

bump2version.exe  --search 1.0.17 --replace 1.0.17-testing --verbose --new-version 1.0.17-test-1 part
Run Code Online (Sandbox Code Playgroud)

不要给出任何错误,但会在管理版本字符串的所有文件中产生错误的版本字符串。

.bumpversion.cfg 文件如下所示:

[bumpversion]
current_version = 1.0.17

[bumpversion:file:CMakeLists.txt]
search = MVR_VERSION "{current_version}"
replace = MVR_VERSION "{new_version}"

[bumpversion:file:VERSION.txt]
search = {current_version}
replace = {new_version}

[bumpversion:file:installer/mvr.iss]
search = #define MyAppVersion "{current_version}"
replace = #define MyAppVersion "{new_version}"
Run Code Online (Sandbox Code Playgroud)

在应该更改版本字符串的每个文件中,更改如下所示:

set(MVR_VERSION "MVR_VERSION "1.0.17"" )
Run Code Online (Sandbox Code Playgroud)

这是不对的。正确的搜索/替换是

set(MVR_VERSION "1.0.17-test-1" )
Run Code Online (Sandbox Code Playgroud)

关于如何使用凹凸2版本标志来实现自定义版本有任何提示吗?

python versioning bump2version

4
推荐指数
1
解决办法
8961
查看次数

Elastic - 防止更新文档

我可以使文档不可变吗?当文档提交给同一个 id 时,它们不会被重写吗?

POST "localhost:9200/index001/_doc/1" // First time it is created
'
{
  "stuff": {
      
  }
}
'

POST "localhost:9200/index001/_doc/1"  // Fails
'
{
  "otherstuff": {
      
  }
}
'
Run Code Online (Sandbox Code Playgroud)

elastic 的 _version 字段可以帮助解决这个问题吗?

versioning elasticsearch

4
推荐指数
1
解决办法
1176
查看次数