Skip to content

Commit 5bed196

Browse files
authored
Update version in setup.py when release
2 parents ac1334c + f954026 commit 5bed196

File tree

9 files changed

+43
-253
lines changed

9 files changed

+43
-253
lines changed

.bumpversion.cfg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[bumpversion]
2+
commit = True
3+
tag = False
4+
message = Bump version: {current_version} → {new_version}
5+
6+
[bumpversion:file:setup.py]
7+
search='{current_version}'
8+
replace='{new_version}'

.github/workflows/publish-release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,28 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
- name: Get Release
18+
uses: agners/[email protected]
19+
id: get_release
20+
env:
21+
GITHUB_TOKEN: ${{ github.token }}
22+
with:
23+
tag_name: ${{ github.ref }}
24+
- name: Bump up version
25+
env:
26+
NEW_TAG: ${{ steps.get_release.outputs.tag_name }}
27+
run: |
28+
pip install --upgrade bumpversion
29+
LAST_TWO_TAGS=$(git for-each-ref refs/tags/ --count=2 --sort=-v:refname --format="%(refname:short)")
30+
LAST_ONE=$(echo $LAST_TWO_TAGS | cut -d' ' -f 2)
31+
last_version=$(echo ${LAST_ONE//v/""})
32+
echo Last version: ${last_version}
33+
new_version=$(echo ${NEW_TAG//v/""})
34+
echo New version: ${new_version}
35+
git config --local user.name "github-actions[bot]"
36+
bumpversion --current-version $last_version --new-version $new_version setup.py
1537
- name: update changelog with gren
1638
env:
1739
GREN_GITHUB_TOKEN: ${{ secrets.TOKEN }}

.reuse/dep5

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
22
Upstream-Name: FOSSLight Source
33
Source: https://github.com/fosslight/fosslight_source
44

5-
Files: docs/*
6-
Copyright: 2021 LG Electronics
7-
License: Apache-2.0
8-
95
Files: *.md
106
Copyright: 2021 LG Electronics
117
License: Apache-2.0
@@ -24,4 +20,8 @@ License: Apache-2.0
2420

2521
Files: requirements*.txt
2622
Copyright: 2021 LG Electronics
27-
License: Apache-2.0
23+
License: Apache-2.0
24+
25+
Files: .bumpversion.cfg
26+
Copyright: 2021 LG Electronics
27+
License: Apache-2.0

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
include LICENSE
22
include README.md
33
include requirements.txt
4-
include docs/*

README.md

Lines changed: 8 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ Copyright (c) 2021 LG Electronics
33
SPDX-License-Identifier: Apache-2.0
44
-->
55
<p align='right'>
6-
<a href="https://github.com/fosslight/fosslight_source_scanner/blob/main/docs/README_Kor.md">
6+
<a href="https://fosslight.org/fosslight-guide/scanner/1_source.html">
77
[Korean]
88
</a>
99
</p>
1010

1111
# FOSSLight Source Scanner
1212

13-
<img src="https://img.shields.io/pypi/l/fosslight_source" alt="FOSSLight Source Scanner is released under the Apache-2.0 License." /> <img src="https://img.shields.io/pypi/v/fosslight_source" alt="Current python package version." /> <img src="https://img.shields.io/pypi/pyversions/fosslight_source" /> [![REUSE status](https://api.reuse.software/badge/github.com/fosslight/fosslight_source_scanner)](https://api.reuse.software/info/github.com/fosslight/fosslight_source_scanner)
13+
<img src="https://img.shields.io/pypi/l/fosslight_source" alt="FOSSLight Source Scanner is released under the Apache-2.0 License." /> <img src="https://img.shields.io/pypi/v/fosslight_source" alt="Current python package version." /> <img src="https://img.shields.io/pypi/pyversions/fosslight_source" /> [![REUSE status](https://api.reuse.software/badge/github.com/fosslight/fosslight_source_scanner)](https://api.reuse.software/info/github.com/fosslight/fosslight_source_scanner) [![Guide](http://img.shields.io/badge/-doc-blue?style=flat-square&logo=github&link=https://fosslight.org/fosslight-guide-en/scanner/1_source.html)](https://fosslight.org/fosslight-guide-en/scanner/1_source.html)
1414
</p>
1515

1616
```note
@@ -23,86 +23,18 @@ Use Source Code Scanner and process the scanner results.
2323

2424
[sc]: https://github.com/nexB/scancode-toolkit
2525

26-
## Contents
2726

28-
- [Prerequisite](#-prerequisite)
29-
- [How to install](#-how-to-install)
30-
- [How to run](#-how-to-run)
31-
- [Result](#-result)
32-
- [How to report issue](#-how-to-report-issue)
33-
- [License](#-license)
27+
## 📖 User Guide
3428

29+
We describe the user guide in the FOSSLight guide page.
30+
Please see the [**User Guide**](https://fosslight.org/fosslight-guide-en/scanner/1_source.html) for more information on how to install and run it.
3531

36-
## 📋 Prerequisite
3732

38-
FOSSLight Source Scanner needs a Python 3.6+.
39-
For windows, you need to install [Microsoft Visual C++ Build Tools][ms_build].
33+
## 👏 Contributing Guide
4034

41-
[ms_build]: https://visualstudio.microsoft.com/vs/older-downloads/
35+
We always welcome your contributions.
36+
Please see the [CONTRIBUTING guide](https://fosslight.org/fosslight-guide-en/learn/1_contribution.html) for how to contribute.
4237

43-
## 🎉 How to install
44-
45-
It can be installed using pip3. It is recommended to install it in the [python 3.6 + virtualenv](https://github.com/fosslight/fosslight_source_scanner/blob/main/docs/Guide_virtualenv.md) environment.
46-
47-
```
48-
$ pip3 install fosslight_source
49-
```
50-
51-
## 🚀 How to run
52-
53-
There are two commands for FOSSLight Source Scanner.
54-
55-
### 1. fosslight_source
56-
After executing ScanCode, the source code scanner, print the FOSSLight Report.
57-
58-
| Parameter | Argument | Description |
59-
| ------------- | ------------- | ------------- |
60-
| h | None | Print help message. |
61-
| p | String | Path to detect source. |
62-
| j | None | As an output, the result of executing ScanCode in json format other than FOSSLight Report is additionally generated. |
63-
| o | String | Output file name without file extension. |
64-
65-
#### Ex. Print result to FOSSLight Report and json file
66-
```
67-
$ fosslight_source -p /home/source_path -j
68-
```
69-
70-
### 2. fosslight_convert
71-
Converts the result of executing ScanCode in json format into FOSSLight Report format.
72-
73-
| Parameter | Argument | Description |
74-
| ------------- | ------------- | ------------- |
75-
| h | None | Print help message. |
76-
| p | String | Path of ScanCode json files. |
77-
| o | String | Output file name without file extension. |
78-
79-
#### Ex. Converting scancode json result to FOSSLight report
80-
```
81-
$ fosslight_convert -p /home/jsonfile_dir
82-
```
83-
84-
## 📁 Result
85-
86-
```
87-
$ tree
88-
.
89-
├── FOSSLight-Report_2021-05-03_00-39-49.csv
90-
├── FOSSLight-Report_2021-05-03_00-39-49.xlsx
91-
├── scancode_2021-05-03_00-39-49.json
92-
└── fosslight_src_log_2021-05-03_00-39-49.txt
93-
94-
```
95-
- FOSSLight-Report_[datetime].xlsx : FOSSLight Source Scanner result in OSS Report format.
96-
- FOSSLight-Report_[datetime].csv : FOSSLight Source Scanner result in csv format. (Except Windows)
97-
- fosslight_src_log_[datetime].txt : The execution log.
98-
- scancode_[datetime].json : The ScanCode result in case of -j option.
99-
100-
101-
## 👏 How to report issue
102-
103-
Please report any ideas or bugs to improve by creating an issue in [Git Repository][repo]. Then there will be quick bug fixes and upgrades. Ideas to improve are always welcome.
104-
105-
[repo]: https://github.com/fosslight/fosslight_source_scanner/issues
10638

10739
## 📄 License
10840

docs/Guide_virtualenv.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

docs/Guide_virtualenv_Kor.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

docs/README_Kor.md

Lines changed: 0 additions & 105 deletions
This file was deleted.

docs/img/fosslight_source.png

-11.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)