Skip to content

fix: version update + changelog via PR #252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 20 additions & 18 deletions .github/workflows/pr_merge.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
name: Build PR Merge
on:
pull_request:
types: [closed]
types: [ closed ]

env:
ARTIFACT_BASE_NAME: cumulus_lambda_functions
PR_NUMBER: ${{ github.event.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
PAT_TOKEN: ${{ secrets.PAT_SECRET }}
GH_TOKEN: ${{ github.token }}
jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.9'
- run: |
# make file runnable, might not be necessary
chmod +x "${GITHUB_WORKSPACE}/ci.cd/store_version.sh"
echo "what the ..."
"${GITHUB_WORKSPACE}/ci.cd/store_version.sh"
- run: |
artifact_file_name="${{ env.ARTIFACT_BASE_NAME }}-${{ env.software_version }}.zip"
echo "${PR_TITLE} -- ${PR_NUMBER}"
- run: |
python3 "${GITHUB_WORKSPACE}/ci.cd/update_setup_version.py" install
- run: |
chmod +x "${GITHUB_WORKSPACE}/ci.cd/update_version_commit.sh"
"${GITHUB_WORKSPACE}/ci.cd/update_version_commit.sh"
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.9'
- run: |
# make file runnable, might not be necessary
chmod +x "${GITHUB_WORKSPACE}/ci.cd/store_version.sh"
echo "what the ..."
"${GITHUB_WORKSPACE}/ci.cd/store_version.sh"
- run: |
artifact_file_name="${{ env.ARTIFACT_BASE_NAME }}-${{ env.software_version }}.zip"
echo "${PR_TITLE} -- ${PR_NUMBER}"
- run: |
python3 "${GITHUB_WORKSPACE}/ci.cd/update_setup_version.py" install
- run: |
chmod +x "${GITHUB_WORKSPACE}/ci.cd/update_version_commit.sh"
"${GITHUB_WORKSPACE}/ci.cd/update_version_commit.sh"
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ 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).

## [5.5.4] - 2023-10-03
### Fixed
- [#249](https://github.com/unity-sds/unity-data-services/pull/249) chore: update version + change log

## [5.5.3] - 2023-10-03
### Fixed
- [#248](https://github.com/unity-sds/unity-data-services/pull/248) fix: github action write protected branch 15

## [5.5.2] - 2023-10-02
### Fixed
- [#233](https://github.com/unity-sds/unity-data-services/pull/233) fix: github action write protected branch 7

## [5.5.1] - 2023-09-21
### Changed
- [#207](https://github.com/unity-sds/unity-data-services/pull/207) feat: upper limit = 50 for collections
Expand Down
31 changes: 25 additions & 6 deletions ci.cd/update_version_commit.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
#!/usr/bin/env bash
#current_branch=`git branch --show-current`
current_branch='develop-2023-10-02'
temp_branch="chore-version-update"
commit_message="chore: update version + change log"

env

git stash
git checkout -b ${temp_branch}
git stash pop
git status
git diff
current_branch=`git branch --show-current`
git config --local user.email "wai.phyo@jpl.nasa.gov"
git config --local user.name ${GITHUB_TRIGGERING_ACTOR}
git add -u
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m 'chore: update version + change log'
git push origin $current_branch
git commit -m "${commit_message}"
git push --force origin $temp_branch
echo "creating PR"
result=`gh pr create --base "${current_branch}" --body "NA" --head "${temp_branch}" --title "${commit_message}"`
echo "PR result $result"
pr_number=`echo $result | grep -oE '[0-9]+$'`
echo "PR number ${pr_number}"
# don't allow auto merge to avoid bad actors using it to merge other code
#gh pr review $pr_number --approve
#echo "merging PR"
#gh pr merge $pr_number --squash --admin
#echo "deleting branch"
#git push origin --delete ${temp_branch}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

setup(
name="cumulus_lambda_functions",
version="5.5.1",
version="5.5.4",
packages=find_packages(),
install_requires=install_requires,
tests_require=['mock', 'nose', 'sphinx', 'sphinx_rtd_theme', 'coverage', 'pystac', 'python-dotenv', 'jsonschema'],
Expand Down