Skip to content

Commit

Permalink
feat: parse new config with topics
Browse files Browse the repository at this point in the history
  • Loading branch information
easbarba committed Sep 6, 2024
1 parent dc8d6bb commit 613ddd3
Show file tree
Hide file tree
Showing 50 changed files with 1,820 additions and 1,103 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/ci.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: tests

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

env:
CARGO_TERM_COLOR: always

jobs:
tests:
runs-on: ubuntu-latest
container:
image: registry.gitlab.com/easbarba/onur-rust:0.4.0

defaults:
run:
working-directory: /home/easbarba/app

steps:
- name: Integration Tests

run: |
./prepare.bash
cargo test --verbose
18 changes: 18 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
workflow:
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_COMMIT_BRANCH == 'main'

stages:
- build
- test

default:
image: registry.gitlab.com/easbarba/onur-rust:$ONUR_VERSION

Integration Testing:
stage: test
script:
- cargo test

25 changes: 14 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
<!--
Copyright 2023 EAS Barbosa
Onur is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Licensed under the Apache License, Version 2.0(the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Onur is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You should have received a copy of the GNU General Public License
along with Onur. If not, see <https://www.gnu.org/licenses/>.
-->

## 0.4.0

- feat: parse new config with topics

## 0.3.0

- refactor: improve configuration parsing
Expand Down
34 changes: 17 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
<!--
Copyright 2023 EAS Barbosa
Licensed under the Apache License, Version 2.0(the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Onur is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Onur is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Onur. If not, see <https://www.gnu.org/licenses/>.
-->

# CONTRIBUTING
Expand All @@ -24,7 +21,10 @@ Contributions are welcome via pull request.

Please make sure to successfully check-up the guidelines list before sending a PR:

- run `./prfix.bash`
- run tests
- check for updates
```sh
```

- run usual checkers with `./prfix.bash`:
- add due entries changes in `CHANGELOG.md`
- tag per [SemVer](http://semver.org/).
14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
name = "onur"
version = "0.3.0"
version = "0.4.0"
edition = "2021"
description = "Easily manage multiple FLOSS repositories"
authors = ["EAS Barbosa <easbarba@outlook.com>"]
license = "Apache-2.0"
license = "GPL-3 or later"
repository = "https://gitlab.com/easbarba/onur"

[dependencies]
clap = {version = "4.3.21", features = ["derive"]}
git2 = "0.17.2"
serde = "1.0.183"
serde_derive = "1.0.183"
serde_json = "1.0.104"
clap = {version = "4.5.17", features = ["derive"]}
git2 = "0.19.0"
serde = "1.0.209"
serde_derive = "1.0.209"
serde_json = "1.0.127"
34 changes: 30 additions & 4 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
FROM rust:1
WORKDIR /app
# Onur is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Onur is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Onur. If not, see <https://www.gnu.org/licenses/>.

FROM rust:1.80

ENV USERNAME easbarba
ENV APP_HOME /home/$USERNAME/app
WORKDIR $APP_HOME

RUN groupadd -r $USERNAME && useradd -r -g $USERNAME -d /home/$USERNAME -m -s /bin/bash $USERNAME
RUN chown -R $USERNAME:$USERNAME /home/$USERNAME

COPY examples examples
COPY ./prepare.bash .
RUN ./prepare.bash

COPY Cargo.toml Cargo.lock .
RUN mkdir src; echo "fn main() {}" > src/main.rs
RUN cargo build
RUN rm ./src/main.rs

COPY . .
ENTRYPOINT ["./entrypoint.sh"]
CMD ["cargo", "test"]
RUN cargo build

CMD [ "cargo", "test" ]
Loading

0 comments on commit 613ddd3

Please sign in to comment.