Skip to content

Commit cd974c7

Browse files
feat: Remove dependency updates section from release notes and automation script (#335)
1 parent d854ea8 commit cd974c7

File tree

4 files changed

+6
-50
lines changed

4 files changed

+6
-50
lines changed

.pipeline/scripts/release_notes_automation.py

+1-29
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,12 @@ def write_file(file_name, data):
3131
""",
3232
"""### 📈 Improvements
3333
34-
- Dependency Updates:
35-
- SAP dependency updates:
36-
- Update [thing](https://link-to-thing) from `a.b.c` to `x.z.y`
37-
- Other dependency updates:
38-
- Major version updates:
39-
- Update [thing](https://link-to-thing) from `a.b.c` to `x.z.y`
40-
- Minor version updates:
41-
- Update [thing](https://link-to-thing) from `a.b.c` to `x.z.y`
34+
-
4235
4336
""",
4437
"""### 🐛 Fixed Issues
4538
4639
-
47-
4840
"""]
4941

5042
def remove_unchanged_sections(file, unchanged_sections):
@@ -66,25 +58,6 @@ def link_github_release(file, version):
6658
return file
6759

6860

69-
def clean_up_dependency_updates(file):
70-
empty_dependency_update = "- Update \[thing\]\(https://link-to-thing\) from `a.b.c` to `x.z.y`\n"
71-
sap_dependency_update = " - SAP dependency updates:\n "+empty_dependency_update
72-
major_dependency_update = " - Major version updates:\n "+empty_dependency_update
73-
minor_dependency_update = " - Minor version updates:\n "+empty_dependency_update
74-
other_dependency_update = " - Other dependency updates:\n "+major_dependency_update+"\n"+minor_dependency_update
75-
76-
# Dependency Updates cannot be ALL empty since we already removed the entire empty section in remove_unchanged_sections()
77-
# First we remove the biggest strings, then the smaller ones
78-
79-
# 2 biggest strings
80-
file = re.sub(sap_dependency_update, "", file)
81-
file = re.sub(other_dependency_update, "", file)
82-
# smaller strings
83-
file = re.sub(major_dependency_update, "", file)
84-
file = re.sub(minor_dependency_update, "", file)
85-
# smallest leftovers
86-
file = re.sub(empty_dependency_update, "", file)
87-
return file
8861

8962
releases_pattern = re.compile(r"^## ")
9063
def count_releases(filename):
@@ -126,7 +99,6 @@ def write_release_notes(folder, target_file):
12699
file = remove_unchanged_sections(file, unchanged_sections)
127100
file = set_header(file, args.version)
128101
file = link_github_release(file, args.version)
129-
file = clean_up_dependency_updates(file)
130102

131103
target_file = find_target_file(args.version)
132104
write_release_notes(args.folder, target_file)

.pipeline/scripts/release_notes_template.md

+1-9
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,8 @@
1616

1717
### 📈 Improvements
1818

19-
- Dependency Updates:
20-
- SAP dependency updates:
21-
- Update [thing](https://link-to-thing) from `a.b.c` to `x.z.y`
22-
- Other dependency updates:
23-
- Major version updates:
24-
- Update [thing](https://link-to-thing) from `a.b.c` to `x.z.y`
25-
- Minor version updates:
26-
- Update [thing](https://link-to-thing) from `a.b.c` to `x.z.y`
19+
-
2720

2821
### 🐛 Fixed Issues
2922

3023
-
31-

docs/how-to/release.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release the SAP Cloud SDK for Java to Maven Central
22

3-
- In GitHub, go to the [Prepare Release](https://github.com/SAP/cloud-sdk-java/actions/workflows/prepare_release.yml) Workflow.
3+
- In GitHub, go to the [Prepare Release](https://github.com/SAP/cloud-sdk-java/actions/workflows/prepare-release.yaml) Workflow.
44
- Click **Run workflow** drop-down.
55
- Optional: Enter the desired version in the **Release version** field. If not provided, the current snapshot version will be used.
66
- Optional: Enter the branch name to release from. By default, this is our `main` branch.
@@ -10,7 +10,7 @@ Additionally, the workflow will create a few PRs:
1010

1111
1. One to update our JavaDocs in [the Documentation Repository](https://github.com/sap/cloud-sdk)
1212
2. Another one to update our release notes, also in [the Documentation Repository](https://github.com/sap/cloud-sdk)
13-
* **Note** As we are splitting our release notes every 15 minor versions, some manual adjustment might be needed
13+
* **Note** As we are splitting our release notes every 15 minor versions, some manual adjustment might be needed to both `index.jsx` and `release-notes.mdx`
1414
3. A third one for the actual changes in [the Code Repository](https://github.com/sap/cloud-sdk-java)
1515

1616
Lastly, the workflow also creates a new draft release and an according tag.
@@ -21,7 +21,7 @@ All of these things will be linked in the Code PR, so that they can be found eas
2121
As the second to last step, you will trigger the [Perform Release Workflow](https://github.com/SAP/cloud-sdk-java/actions/workflows/perform-release.yml).
2222

2323
This workflow will take care of merging the PRs and creates a **staging release** in [Sonatype](https://oss.sonatype.org/).
24-
As the very last step, once the _Perform Release_ workflow has finished successfully, you need to log into _Sonatype_ and publish the staging release.
24+
As the very last step, once the _Perform Release_ workflow has finished successfully, you need to log into _Sonatype_ and publish the staging release using the `Technical User for Releases` account.
2525

2626
That's it!
2727
The new version should be available for consumers within a few hours.

release_notes.md

+1-9
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,8 @@
1616

1717
### 📈 Improvements
1818

19-
- Dependency Updates:
20-
- SAP dependency updates:
21-
- Update [thing](https://link-to-thing) from `a.b.c` to `x.z.y`
22-
- Other dependency updates:
23-
- Major version updates:
24-
- Update [thing](https://link-to-thing) from `a.b.c` to `x.z.y`
25-
- Minor version updates:
26-
- Update [thing](https://link-to-thing) from `a.b.c` to `x.z.y`
19+
-
2720

2821
### 🐛 Fixed Issues
2922

3023
-
31-

0 commit comments

Comments
 (0)