diff --git a/.github/workflows/buldrpm.yml b/.github/workflows/buldrpm.yml index dccf4e3..0e1dab6 100644 --- a/.github/workflows/buldrpm.yml +++ b/.github/workflows/buldrpm.yml @@ -3,7 +3,8 @@ name: RPM Build and Upload on: pull_request: branches: - - 'release/*' + - 'main' + - 'master' jobs: build: @@ -16,6 +17,11 @@ jobs: fetch-depth: 0 ref: + - name: Set Git identity + run: | + git config --global user.email "actions@github.com" + git config --global user.name "GitHub Actions" + - name: Check Branch and Target if: > github.event_name == 'pull_request' && @@ -44,16 +50,23 @@ jobs: git pull origin $DEFAULT_BRANCH env: DEFAULT_BRANCH: ${{ env.DEFAULT_BRANCH }} - + + - name: Create tag + run: | + git fetch --all --tags + tag_name="${{ env.VERSION }}" + if ! git rev-parse -q --verify "refs/tags/$tag_name" >/dev/null; then + git tag $tag + fi + env: + DEFAULT_BRANCH: ${{ env.DEFAULT_BRANCH }} + - name: Set Version & pull tag id: version run: | VERSION=$(echo ${{ github.head_ref }} | sed 's/release\///') echo "VERSION=${VERSION}" >> $GITHUB_ENV - git pull origin $VERSION - - echo "Set VERSION to $VERSION" - name: Comment version BUMP uses: actions/github-script@v5 @@ -114,11 +127,6 @@ jobs: env: DEFAULT_BRANCH: ${{ env.DEFAULT_BRANCH }} - - name: Set Git identity - run: | - git config --global user.email "actions@github.com" - git config --global user.name "GitHub Actions" - - name: Bump version with actions run: | git pull @@ -167,10 +175,16 @@ jobs: all_emails+="$email, " done + all_commits="" + for commits in "${!authors_commits[@]}"; do + all_commits+="${authors_commits["$commits"]}" + done + # Trim the trailing comma and space all_emails=${all_emails%, *} echo -e "* $current_date $all_authors <$all_emails> - $VERSION" >> $changelog_file + echo -e "$all_commits" >> $changelog_file spec_file=$(find . -type f -name "*.spec" | head -n 1) changelog_section=$(awk '/%changelog/{p=1;next} p' $spec_file) @@ -203,13 +217,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VERSION: ${{ env.VERSION }} DEFAULT_BRANCH: ${{ env.DEFAULT_BRANCH }} - - - name: Create tag - run: | - git fetch --all --tags - tag_name="${{ env.VERSION }}" - if ! git rev-parse -q --verify "refs/tags/$tag_name" >/dev/null; then - git tag $tag - name: Release uses: softprops/action-gh-release@v1 diff --git a/README.md b/README.md index 748eac4..d8b6be3 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ ## Overview -LogStatter is a high-performance monitoring application for logstash written in Rust. is designed to provide lightning-fast real-time process & pipeline anaylsis for Logstash, with output capabilities to Kafka. +LogStatter is a high-performance monitoring application for logstash written in Rust. is designed to provide lightning-fast real-time process & pipeline anaylsis for Logstash, with output capabilities to Kafka ## Getting Started diff --git a/build.date b/build.date new file mode 100644 index 0000000..fa741e2 --- /dev/null +++ b/build.date @@ -0,0 +1,2 @@ +14/12/2023 - 0.0.1 +14/12/2023 - 0.0.2 diff --git a/packaging/rpm/rb-logstatter.spec b/packaging/rpm/rb-logstatter.spec index 3216861..160aeb6 100644 --- a/packaging/rpm/rb-logstatter.spec +++ b/packaging/rpm/rb-logstatter.spec @@ -3,50 +3,49 @@ Version: %{__version} Release: %{__release}%{?dist} BuildArch: x86_64 Summary: Logstatter service to monitor logstash - License: AGPL-3.0 URL: https://github.com/malvads/logstatter Source0: %{name}-%{version}.tar.gz - -BuildRequires: gcc openssl-devel - +BuildRequires: perl gcc openssl-devel %global debug_package %{nil} - %description %{summary} - %prep %autosetup - %build curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y source $HOME/.cargo/env - cargo build --release - %install install -D target/release/logstatter %{buildroot}/usr/bin/logstatter install -D -m 0644 src/systemd/rb-logstatter.service %{buildroot}/usr/lib/systemd/system/rb-logstatter.service install -D -m 0644 src/etc/logstatter.conf %{buildroot}/etc/logstatter/logstatter.conf - %pre getent group logstatter >/dev/null || groupadd -r logstatter getent passwd logstatter >/dev/null || useradd -r -g logstatter -d /var/lib/logstatter -s /sbin/nologin -c "RedBorder Logstatter User" logstatter - %post systemctl daemon-reload systemctl start rb-logstatter - %files %defattr(0755,logstatter,logstatter) /usr/bin/logstatter %defattr(644,root,root) /usr/lib/systemd/system/rb-logstatter.service /etc/logstatter/logstatter.conf - %doc - %changelog +* Thu Dec 14 2023 Miguel Negron, Malvads, GitHub Actions - 0.0.2 +- Trigger workflow +- Update README +- Fix CI +- Delete chagelog tpm +- Fix CI +- Merge branch 'release/0.0.2' of github.com:redBorder/logstatter into release/0.0.2 +- Add build dates +- Merge branch 'main' into release/0.0.2 +- Fix auto bumping +- Update workflow +- Add auto bumping +- Bump version 0.0.2 * Mon Dec 11 2023 Miguel Álvarez - 0.0.1-1 - Initial package release -