Skip to content

Commit 34fbcba

Browse files
authored
chore(ci) Prepare for publishing to maven central from jenkins (#43)
* Prepare for publishing to maven central from jenkins
1 parent f13e683 commit 34fbcba

File tree

5 files changed

+32
-6
lines changed

5 files changed

+32
-6
lines changed

Diff for: Makefile

+12
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ clean:
66
build:
77
./gradlew shadowJar
88

9+
.PHONY: publish
10+
publish:
11+
@echo "./gradlew clean :agent:shadowJar publishToSonatype closeAndReleaseSonatypeStagingRepository"
12+
@./gradlew clean :agent:shadowJar publishToSonatype closeAndReleaseSonatypeStagingRepository \
13+
-PsonatypeUsername="$(NEXUS_USERNAME)" \
14+
-PsonatypePassword="$(NEXUS_PASSWORD)" \
15+
-Psigning.secretKeyRingFile="$(NEXUS_GPG_SECRING_FILE)" \
16+
-Psigning.password="$(NEXUS_GPG_PASSWORD)" \
17+
-Psigning.keyId="$(NEXUS_GPG_KEY_ID)"
18+
@echo "Now you go https://s01.oss.sonatype.org, close the temporarly created staging repository and release it"
19+
@echo "https://central.sonatype.org/publish/release/#locate-and-examine-your-staging-repository"
20+
921
.PHONY: test
1022
test:
1123
./gradlew test

Diff for: agent/build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repositories {
2222
}
2323

2424
def asyncProfilerVersion = "2.8.0.2"
25-
def pyroscopeVersion = "0.8.0"
25+
def pyroscopeVersion = project.properties['pyroscope_version']
2626
dependencies {
2727
implementation files("$buildDir/async-profiler/async-profiler.jar")
2828
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.17.1'
@@ -190,3 +190,4 @@ publishing {
190190
signing {
191191
sign publishing.publications.shadow
192192
}
193+

Diff for: build.gradle

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
plugins {
2+
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
3+
}
4+
5+
group = "io.pyroscope"
6+
version = project.properties['pyroscope_version']
7+
8+
nexusPublishing {
9+
repositories {
10+
sonatype { //only for users registered in Sonatype after 24 Feb 2021
11+
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
12+
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
13+
}
14+
}
15+
}

Diff for: demo/build.gradle

+1-5
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ repositories {
99
mavenCentral()
1010
}
1111
dependencies {
12-
if (project.hasProperty("pyroscopeDev")) {
13-
implementation(project(":agent"))
14-
} else {
15-
implementation('io.pyroscope:agent:0.8.0')
16-
}
12+
implementation(project(":agent"))
1713
}
1814

Diff for: gradle.properties

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pyroscope_version=0.8.1
2+

0 commit comments

Comments
 (0)