Skip to content

Commit

Permalink
fix(common): Fix pytest exclusion, gitignore, and changelog checks
Browse files Browse the repository at this point in the history
  • Loading branch information
espressif-abhikroy committed Oct 20, 2023
1 parent 3e8de3a commit d62161c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 94 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion ci/bump
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if ! cz bump --dry-run; then
fi

cz_bump_out=`cz bump --files-only "$@"`
commit_title=`echo "${cz_bump_out}" | head -1`
commit_title=`echo "${cz_bump_out}" | grep "bump(" | head -1`
commit_body=`cat ../../release_notes.txt`

git add -u .
Expand Down
10 changes: 10 additions & 0 deletions ci/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ def main():
'breaking': 'Breaking changes',
'major': 'Major changes'
}

res = git('show-ref', '--tags', _tty_out=False)
if old_ref not in res:
old_ref = git.log(reverse=True, pretty='oneline', _tty_out=False).split('\n')[0].split(' ')[0]

brief_log = git.log('--oneline', '{}..HEAD'.format(old_ref), '--', 'components/' + component, _tty_out=False)
for oneline in brief_log.splitlines():
[commit, brief_msg] = oneline.split(' ', 1)
Expand Down Expand Up @@ -80,6 +85,11 @@ def main():
changelog += '- {}\n'.format(it)
changelog += '\n'
filename = os.path.join(root_path, 'components', component, 'CHANGELOG.md')
# Check if the changelog file exists.
if not os.path.exists(filename):
# File does not exist, create it
with open(filename, 'w') as file:
file.write('# Changelog\n\n')
# insert the actual changelog to the beginning of the file, just after the title (2nd line)
with open(filename, 'r') as orig_changelog:
changelog_title = orig_changelog.readline(
Expand Down
93 changes: 0 additions & 93 deletions components/esp_websocket_client/.gitignore

This file was deleted.

3 changes: 3 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ log_file = test.log
log_file_level = INFO
log_file_format = %(asctime)s %(levelname)s %(message)s
log_file_date_format = %Y-%m-%d %H:%M:%S

# Directory patterns to avoid for recursion
norecursedirs = "managed_components"

0 comments on commit d62161c

Please sign in to comment.