Coder Social home page Coder Social logo

Comments (4)

simonbasle avatar simonbasle commented on June 5, 2024

Gradle custom task to qualify the version (this task correctly parses qualifiers of old scheme milestones and release candidates with the dot separator, as well as dash separator):

import org.gradle.util.VersionNumber

def qualifyVersion(String v) {
  def versionNumber = VersionNumber.parse(v)

  if (versionNumber == VersionNumber.UNKNOWN) return "BAD";
  
  if (versionNumber.qualifier == null || versionNumber.qualifier.size() == 0) return "RELEASE" //new scheme
  if (versionNumber.qualifier == "RELEASE") return "RELEASE" //old scheme
  if (versionNumber.qualifier.matches("(?:M|RC)\\d+")) return "MILESTONE"
  if (versionNumber.qualifier == "SNAPSHOT" || versionNumber.qualifier == "BUILD-SNAPSHOT") return "SNAPSHOT"
  
  return "BAD"
}

task qualifyVersionGha() {
  def versionType = qualifyVersion(version)

  if (versionType == "BAD") {
    println "::warning ::Unable to parse $version to a VersionNumber with recognizable qualifier"
  }
  
  println "::set-output name=versionType::$versionType"
  println "::set-output name=fullVersion::$version"
}

from reactor.

simonbasle avatar simonbasle commented on June 5, 2024

While evaluating this solution, a few things that came up for consideration:

  • the artifactory and signing plugins are only loaded if relevant credentials are accessible
  • since we'd like to draft releases notes earlier than currently, it doesn't make much sense to use the tag-and-release action. git commands should work thanks to checkout@v2 so we use git tag command
  • some projects have artifacts that get rejected by Maven Central (eg. docs zip) so we need to differentiate between what goes to Artifactory (everything) and what goes to Central (the MavenJavaPublication)

from reactor.

simonbasle avatar simonbasle commented on June 5, 2024

TODO by May's release:

  • reactor-kafka
  • reactor-rabbitmq
  • reactor-kotlin-extensions
  • create gha environments for the above
  • disable Bamboo plans for the above + disable their dysprosium branch plan as well

from reactor.

simonbasle avatar simonbasle commented on June 5, 2024

This migration is complete as of 2021/04/14

from reactor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.