Skip to content
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

Update version in setup.py when release #11

Merged
merged 2 commits into from
Jul 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[bumpversion]
commit = True
tag = False
message = Bump version: {current_version} → {new_version}

[bumpversion:file:setup.py]
search='{current_version}'
replace='{new_version}'
22 changes: 22 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get Release
uses: agners/get-draft-release@v1.2.2
id: get_release
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag_name: ${{ github.ref }}
- name: Bump up version
env:
NEW_TAG: ${{ steps.get_release.outputs.tag_name }}
run: |
pip install --upgrade bumpversion
LAST_TWO_TAGS=$(git for-each-ref refs/tags/ --count=2 --sort=-v:refname --format="%(refname:short)")
LAST_ONE=$(echo $LAST_TWO_TAGS | cut -d' ' -f 2)
last_version=$(echo ${LAST_ONE//v/""})
echo Last version: ${last_version}
new_version=$(echo ${NEW_TAG//v/""})
echo New version: ${new_version}
git config --local user.name "github-actions[bot]"
bumpversion --current-version $last_version --new-version $new_version setup.py
- name: update changelog with gren
env:
GREN_GITHUB_TOKEN: ${{ secrets.TOKEN }}
Expand Down
4 changes: 4 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ License: GPL-3.0-only
Files: requirements*.txt
Copyright: 2021 LG Electronics
License: LicenseRef-3rd_party_licenses

Files: .bumpversion.cfg
Copyright: 2021 LG Electronics
License: GPL-3.0-only
5 changes: 3 additions & 2 deletions src/fosslight_reuse/_fosslight_reuse.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
from reuse.report import ProjectReport

_PKG_NAME = "fosslight_reuse"
_MSG_REFERENCE = "Ref. Copyright and License Writing Rules in Source Code. : http://collab.lge.com/main/x/1eb-LQ"
_MSG_FOLLOW_LIC_TXT = "Follow the Copyright and License Writing Rules in Source Code. : http://collab.lge.com/main/x/1eb-LQ"
_RULE_LINK = "https://oss.lge.com/guide/process/osc_process/1-identification/copyright_license_rule.html"
_MSG_REFERENCE = "Ref. Copyright and License Writing Rules in Source Code. : " + _RULE_LINK
_MSG_FOLLOW_LIC_TXT = "Follow the Copyright and License Writing Rules in Source Code. : " + _RULE_LINK
_REUSE_CONFIG_FILE = ".reuse/dep5"
_DEFAULT_EXCLUDE_EXTENSION_FILES = [] # Exclude files from reuse
_DEFAULT_EXCLUDE_EXTENSION = ["jar", "png", "exe", "so", "a", "dll", "jpeg", "jpg", "ttf", "lib", "ttc", "pfb",
Expand Down