quick followup: I usually encode the sha directly into the suffix for test versions, so tagging into git has not been required until now.
On Tue, Apr 28, 2020 at 9:47 AM Laurent Goujon <[email protected]> wrote: > Thanks, very useful. Will give it a try. > > On Tue, Apr 28, 2020 at 9:38 AM Julian Hyde <[email protected]> wrote: > >> PS Oops. You'll obviously want to change >> >> val baseUrl = "https://nexusrepo.looker.com" >> >> to reference your repo, not Looker's. :) >> >> On Tue, Apr 28, 2020 at 9:36 AM Julian Hyde <[email protected]> wrote: >> > >> > I got some some advice from Vladimir, but ran into problems with >> > releases, as you did. I came up with this. Put the following in your >> > ~/.gradle/init.gradle.kts file, and change the username and password: >> > >> > allprojects { >> > plugins.withId("maven-publish") { >> > configure<PublishingExtension> { >> > repositories { >> > maven { >> > name = "secretNexus" >> > val baseUrl = "https://nexusrepo.looker.com" >> > val releasesUrl = >> "$baseUrl/repository/maven-releases" >> > val snapshotsUrl = >> "$baseUrl/repository/maven-snapshots" >> > val release = >> > !project.version.toString().endsWith("-SNAPSHOT") >> > // val release = project.hasProperty("release") >> > url = uri(if (release) releasesUrl else >> snapshotsUrl) >> > credentials { >> > username = "xxx" >> > password = "xxx" >> > } >> > } >> > } >> > } >> > } >> > } >> > >> > To deploy a release, do this: >> > >> > ./gradlew -Prelease -PskipSign >> publishAllPublicationsToSecretNexusRepository >> > >> > If you like change 'secretNexus' to something more meaningful. >> > >> > You'll probably also want to tag the release commit and push the tag >> > to your github fork. >> > >> > Julian >> > >> > On Tue, Apr 28, 2020 at 9:26 AM Laurent Goujon <[email protected]> >> wrote: >> > > >> > > Hi, >> > > >> > > I'd like to build my own non-SNAPSHOT version of Calcite and publish >> it in >> > > my internal repository but I haven't found a way to do it with >> gradle. As >> > > far as I can tell, there is a release plugin >> > > (com.github.vlsi.stage-vote-release) which supports `-Prelease` >> property, >> > > and will remove the -SNAPSHOT suffix, but it also triggers pushing to >> maven >> > > central, git, svn, .... >> > > >> > > What I am looking for is a gradle command with a couple of >> properties on >> > > the commandline to specify the full version (or be able to change >> -SNAPSHOT >> > > into something else) and push to my personal repository (something I >> was >> > > able to do easily with the maven version). >> > > >> > > Thanks in advance, >> > > >> > > Laurent >> >
