Skip to content

Commit 25b875b

Browse files
authored
Merge pull request #104 from microsoftgraph/bugfix/version-bump
bugfix/version bump
2 parents 0dfeeb1 + d205eb8 commit 25b875b

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Get started with the Microsoft Graph SDK for Java by integrating the [Microsoft
1212

1313
Add the repository and a compile dependency for `microsoft-graph-beta` to your project's `build.gradle`:
1414

15-
```gradle
15+
```Groovy
1616
repositories {
1717
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
1818
}
@@ -22,6 +22,8 @@ dependencies {
2222
implementation 'com.microsoft.graph:microsoft-graph-beta:0.15.0-SNAPSHOT'
2323
// Uncomment the line below if you are building an android application
2424
//implementation 'com.google.guava:guava:30.1.1-android'
25+
// This dependency is only needed if you are using the TokenCrendentialAuthProvider
26+
implementation 'com.azure:azure-identity:1.2.5'
2527
}
2628
```
2729

@@ -35,6 +37,12 @@ Add the dependency in `dependencies` in pom.xml
3537
<artifactId>microsoft-graph-beta</artifactId>
3638
<version>0.15.0-SNAPSHOT</version>
3739
</dependency>
40+
<dependency>
41+
<!-- This dependency is only needed if you are using the TokenCrendentialAuthProvider -->
42+
<groupId>com.azure</groupId>
43+
<artifactId>azure-identity</artifactId>
44+
<version>1.2.5</version>
45+
</dependency>
3846
```
3947

4048
Add the repository in `repositories` in pom.xml

Scripts/incrementMinorVersion.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@
1515

1616
function Update-ReadmeVersion([string]$readmeFilePath, [version]$version) {
1717
$readmeFileContent = Get-Content -Path $readmeFilePath -Raw
18-
$readmeFileContent = $readmeFileContent -replace "\d{1,}\.\d{1,}\.\d{1,}", $version.ToString()
18+
$gradlePrefix = "graph"
19+
$readmeFileContent = $readmeFileContent -replace "$($gradlePrefix):\d{1,}\.\d{1,}\.\d{1,}", "$($gradlePrefix):$($version.ToString())"
20+
$gradleLineNumber = Select-String -Path $readmeFilePath -Pattern "```xml" | Select-Object -ExpandProperty LineNumber;
21+
$gradleLineNumber+= 4 # skipping triple tick, block open, comment, groupid, artifactid
22+
$readmeLines = $readmeFileContent -split "`n"
23+
$readmeLines[$gradleLineNumber] = $readmeLines[$gradleLineNumber] -replace "\d{1,}\.\d{1,}\.\d{1,}", $version.ToString()
24+
$readmeFileContent = $readmeLines -join "`n"
1925
Set-Content -Path $readmeFilePath $readmeFileContent
2026
}
2127

0 commit comments

Comments
 (0)