From 5a5cb42f016fe1b1e4c9d336b61e4e28ed972c7a Mon Sep 17 00:00:00 2001 From: shemogumbe Date: Tue, 18 Jun 2024 11:10:28 +0300 Subject: [PATCH 1/9] update publish configurations, remove versioning code --- .github/workflows/publish.yml | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8e5380ef808..43b30362813 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,33 +9,7 @@ permissions: contents: write jobs: - version: - name: Update version - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.12 - - name: Install poetry - run: | - pip install --upgrade poetry - - name: Update version - run: | - VERSION=${GITHUB_REF#refs/tags/v} - poetry version $VERSION - - name: Commit changes - run: | - git config --local user.email "${{ secrets.GIT_USER_EMAIL }}" - git config --local user.name "${{ secrets.GIT_USER_NAME }}" - git commit -am "chore: Update version" - git push origin ${{ github.ref }} - build: - needs: [version] uses: ./.github/workflows/build.yml publish: From ca98b9672590ee8e733219ce7713c989af1002cc Mon Sep 17 00:00:00 2001 From: shemogumbe Date: Tue, 18 Jun 2024 11:14:48 +0300 Subject: [PATCH 2/9] add release please.yml file --- .github/release-please.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .github/release-please.yml diff --git a/.github/release-please.yml b/.github/release-please.yml new file mode 100644 index 00000000000..9d1d1d9c7b1 --- /dev/null +++ b/.github/release-please.yml @@ -0,0 +1,3 @@ +manifest: true +primaryBranch: main +handleGHRelease: true From f8dc116deb01c3549be6355b1ee240308920f324 Mon Sep 17 00:00:00 2001 From: shemogumbe Date: Tue, 18 Jun 2024 11:17:11 +0300 Subject: [PATCH 3/9] add release please manifest --- .release-please-manifest.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .release-please-manifest.json diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 00000000000..73d3293b98f --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.4.0" +} From 4f7ddd29df15ea88843f99cde918c3785f32c5ea Mon Sep 17 00:00:00 2001 From: shemogumbe Date: Tue, 18 Jun 2024 11:24:31 +0300 Subject: [PATCH 4/9] update changelog --- CHANGELOG.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a90545c466f..f6ecf6cbc6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,6 @@ All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - ## [1.5.0] - 2024-05-23 ### Changed From afb97f4d7ff83feddefa13fafb1ea56cee2f05f6 Mon Sep 17 00:00:00 2001 From: shemogumbe Date: Tue, 18 Jun 2024 11:26:24 +0300 Subject: [PATCH 5/9] update contributing - change commit message format --- CONTRIBUTING.md | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aeb155db5aa..70ebdfc7e73 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,4 +18,36 @@ Revisions of this nature will result in a 0.0.X change of the version number. If major functionality is being added, or there will need to be gestation time for a change, it should be submitted against the __feature__ branch. -Revisions of this nature will result in a 0.X.X change of the version number. \ No newline at end of file +Revisions of this nature will result in a 0.X.X change of the version number. + + +## Commit message format + +To support our automated release process, pull requests are required to follow the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) +format. + +Each commit message consists of a **header**, an optional **body** and an optional **footer**. The header is the first line of the commit and +MUST have a **type** (see below for a list of types) and a **description**. An optional **scope** can be added to the header to give extra context. + +``` +[optional scope]: + + + + +``` + +The recommended commit types used are: + + - **feat** for feature updates (increments the _minor_ version) + - **fix** for bug fixes (increments the _patch_ version) + - **perf** for performance related changes e.g. optimizing an algorithm + - **refactor** for code refactoring changes + - **test** for test suite updates e.g. adding a test or fixing a test + - **style** for changes that don't affect the meaning of code. e.g. formatting changes + - **docs** for documentation updates e.g. ReadMe update or code documentation updates + - **build** for build system changes (gradle updates, external dependency updates) + - **ci** for CI configuration file changes e.g. updating a pipeline + - **chore** for miscallaneous non-sdk changesin the repo e.g. removing an unused file + +Adding a footer with the prefix **BREAKING CHANGE:** will cause an increment of the _major_ version. \ No newline at end of file From 5b07a47fc6ee6e66f44c7ef9fef8c6e25d52b8a0 Mon Sep 17 00:00:00 2001 From: shemogumbe Date: Tue, 18 Jun 2024 11:35:26 +0300 Subject: [PATCH 6/9] add comments to allow release please make changes on version numbers --- msgraph_beta/_version.py | 3 +++ pyproject.toml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/msgraph_beta/_version.py b/msgraph_beta/_version.py index e4f18370fa2..f6025298651 100644 --- a/msgraph_beta/_version.py +++ b/msgraph_beta/_version.py @@ -1 +1,4 @@ +# The SDK version +# x-release-please-start-version VERSION: str = '1.5.0' +# x-release-please-end diff --git a/pyproject.toml b/pyproject.toml index 36be6b10940..26e7ac9561d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,10 @@ build-backend = "setuptools.build_meta" [project] name = "msgraph-beta-sdk" +# The SDK version +# x-release-please-start-version version = "1.5.0" +# x-release-please-end authors = [{name = "Microsoft", email = "graphtooling+python@microsoft.com"}] description = "The Microsoft Graph Beta Python SDK" dependencies = [ From 36b1861eb8cc1df94598cce91316718589636bc7 Mon Sep 17 00:00:00 2001 From: shemogumbe Date: Tue, 18 Jun 2024 11:43:50 +0300 Subject: [PATCH 7/9] add release please configurations --- release-please-config.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 release-please-config.json diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 00000000000..8c3943fd59a --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,24 @@ +{ + "bootstrap-sha": "9096adb098e11bd5484335b5e08bd0c882db7407", + "exclude-paths": [ + ".git", + ".idea", + ".github", + ".vscode" + ], + "release-type": "python", + "include-component-in-tag": false, + "include-v-in-tag": true, + "packages": { + ".": { + "package-name": "msgraph_beta", + "changelog-path": "CHANGELOG.md", + "extra-files": [ + "README.md", + "pyproject.toml", + "msgraph/_version.py" + ] + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" + } \ No newline at end of file From a06503732a34f74945aead0fc34b4015043f2642 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 18 Jun 2024 08:39:03 -0400 Subject: [PATCH 8/9] Apply suggestions from code review --- .release-please-manifest.json | 2 +- release-please-config.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 73d3293b98f..6180eb92ed1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.4.0" + ".": "1.5.0" } diff --git a/release-please-config.json b/release-please-config.json index 8c3943fd59a..7b9d6e0f31f 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -14,9 +14,8 @@ "package-name": "msgraph_beta", "changelog-path": "CHANGELOG.md", "extra-files": [ - "README.md", "pyproject.toml", - "msgraph/_version.py" + "msgraph_beta/_version.py" ] } }, From 2b9e788c19f4f2360b1fb5daf3430984bff6ddbf Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 18 Jun 2024 08:43:01 -0400 Subject: [PATCH 9/9] Delete scripts directory --- scripts/incrementMinorVersion.ps1 | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 scripts/incrementMinorVersion.ps1 diff --git a/scripts/incrementMinorVersion.ps1 b/scripts/incrementMinorVersion.ps1 deleted file mode 100644 index 26e6781a416..00000000000 --- a/scripts/incrementMinorVersion.ps1 +++ /dev/null @@ -1,11 +0,0 @@ -Push-Location -Path (Join-Path -Path $PSScriptRoot -ChildPath "..") -$versionFileContent = Get-Content -Path "msgraph_beta/_version.py" -Raw -$version = $versionFileContent.Split("`r`n")[0] -replace "VERSION: str = '", '' -replace "'", '' -$versionParts = $version -split "\." -$versionParts[1] = [int]$versionParts[1] + 1 -$versionParts[2] = 0 -$newVersion = $versionParts -join "." -$versionFileContent -replace $version, $newVersion | Set-Content -Path "msgraph_beta/_version.py" -NoNewline -$pyprojectFileContent = Get-Content -Path "pyproject.toml" -Raw -$pyprojectFileContent -replace $version, $newVersion | Set-Content -Path "pyproject.toml" -NoNewline -Pop-Location \ No newline at end of file