Skip to content

Commit

Permalink
fix: structure and wordings
Browse files Browse the repository at this point in the history
Co-authored-by: Nasreddine Bencherchali <[email protected]>
  • Loading branch information
phantinuss and nasbench authored Oct 6, 2023
1 parent cc8c03f commit 6f894d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,30 @@ jobs:
curr_tag=$(git for-each-ref --sort=creatordate --format '%(refname:lstrip=2)' refs/tags | grep ^r | tail -1)
echo "Previous tag: ${prev_tag}"
echo "Current tag: ${curr_tag}"
echo "#### New rules:" > changes.txt
echo "### New Rules" > changes.txt
git log --pretty=%B ${prev_tag}..${curr_tag} | grep -E '^\s*new: ' | sort | sed -e 's%^% - %' >> changes.txt
echo "#### Changed rules:" >> changes.txt
echo "### Updated Rules" >> changes.txt
git log --pretty=%B ${prev_tag}..${curr_tag} | grep -E '^\s*change: ' | sort | sed -e 's%^% - %' >> changes.txt
echo "#### Rules with fixes:" >> changes.txt
echo "### Fixed Rules" >> changes.txt
git log --pretty=%B ${prev_tag}..${curr_tag} | grep -E '^\s*fix: ' | sort | sed -e 's%^% - %' >> changes.txt
git log --pretty=%B ${prev_tag}..${curr_tag} | grep -oP 'Merge PR #\d+ from \K(@\S+)' | sort -u > authors_raw.txt
git log --pretty=%B ${prev_tag}..${curr_tag} | grep -oP "Co-authored-by: \K.*(?= <)" | sort -u | sed -e 's%^%@%' >> authors_raw.txt
LC_ALL=en_US.UTF-8 sort -u authors_raw.txt | grep -v 'dependabot\[bot\]' > authors.txt
echo "### Changes in this release:" > changelog.txt
cat changes.txt >> changelog.txt
echo "" >> changelog.txt
echo "Thanks to $(perl -pe 's%\n%, %' authors.txt | sed 's%, $%%')" >> changelog.txt
echo "### Acknowledgement" >> changelog.txt
echo "Thanks to $(perl -pe 's%\n%, %' authors.txt | sed 's%, $%%') for their contribution to this release" >> changelog.txt
echo "" >> changelog.txt
echo "" >> changelog.txt
echo "#### Which Sigma rule package should I use?" >> changelog.txt
echo "### Which Sigma rule package should I use?" >> changelog.txt
echo "A detailed explanation can be found in the [Releases.md](Releases.md) file. If you are new to Sigma, we recommend starting with the \"Core\" ruleset." >> changelog.txt
cat changelog.txt
- name: Build all release packages
run: |
python3 tests/sigma-package-release.py --min-status test --min-level high --rule-types generic --outfile sigma-core-${{ github.ref_name }}.zip
python3 tests/sigma-package-release.py --min-status test --min-level medium --rule-types generic --outfile sigma-core+-${{ github.ref_name }}.zip
python3 tests/sigma-package-release.py --min-status experimental --min-level medium --rule-types generic --outfile sigma-core++-${{ github.ref_name }}.zip
python3 tests/sigma-package-release.py --min-status experimental --min-level high --rule-types et --outfile sigma-et-addon-${{ github.ref_name }}.zip
python3 tests/sigma-package-release.py --min-status experimental --min-level high --rule-types et --outfile sigma-emerging-threats-addon-${{ github.ref_name }}.zip
python3 tests/sigma-package-release.py --min-status experimental --min-level high --rule-types generic et --outfile sigma-all-rules-${{ github.ref_name }}.zip
- name: Create Release with Assets
id: create_release
Expand All @@ -59,5 +59,5 @@ jobs:
sigma-core-${{ github.ref_name }}.zip
sigma-core+-${{ github.ref_name }}.zip
sigma-core++-${{ github.ref_name }}.zip
sigma-et-addon-${{ github.ref_name }}.zip
sigma-emerging-threats-addon-${{ github.ref_name }}.zip
sigma-all-rules-${{ github.ref_name }}.zip
2 changes: 1 addition & 1 deletion tests/sigma-package-release.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ def main(arguments: list) -> int:
print("[I] Written all rules to output ZIP file '{}'".format(args.outfile))

if __name__ == '__main__':
sys.exit(main(sys.argv[1:]))
sys.exit(main(sys.argv[1:]))

0 comments on commit 6f894d4

Please sign in to comment.