From 92236e33dd6fdc063893a443e4452a83172cb9b1 Mon Sep 17 00:00:00 2001 From: Juarez Rudsatz Date: Fri, 10 Oct 2025 13:33:02 -0300 Subject: [PATCH 1/9] chore: update changelog.txt --- changelog.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/changelog.txt b/changelog.txt index c68227a..c3175dd 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,31 @@ +debian (0.8.0) stable; urgency=low + + * improved: added --archive-compression flag to the backup command + * improved: added ability to use .env file by @paulheijman + * chore: added comprehensive Makefile.toml with organized task categories + * chore: added VS Code settings with recommended extensions + +-- Juarez Rudsatz Thu, 8 Oct 2025 00:08:00 -0300 + +debian (0.7.1) stable; urgency=low + + * improved: add option to exclude fields by @paulheijman + * improved: added fq option by @paulheijman + * improved: added ability to use .env file by @paulheijman + * chore: upgraded rust crates to latest version + * chore: added verification of Rust MSRV + +-- Juarez Rudsatz Thu, 18 Set 2025 00:07:01 -0300 + +debian (0.6.12) stable; urgency=low + + * ci: refactored improved github action workflows + * chore: upgraded dependencies to latest version + * chore: Upgrade to edition 2024 + * chore: fix: small errors by @0xflotus + +-- Juarez Rudsatz Wed, 19 Mar 2025 00:06:12 -0300 + debian (0.6.0) stable; urgency=low * improved: upgraded clap to 4.5 From a53abda3ed8888c29dc56b12cfe1b9a3bc8f705f Mon Sep 17 00:00:00 2001 From: Juarez Rudsatz Date: Fri, 10 Oct 2025 13:33:21 -0300 Subject: [PATCH 2/9] chore: updated vscode settings --- .vscode/settings.json | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 04ddd37..fc2b4b7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,15 +11,34 @@ "files.insertFinalNewline": true, "files.trimFinalNewlines": true, "files.trimTrailingWhitespace": true, - // Search settings + // Browse/Watch/Search settings + "files.exclude": { + "**/node_modules/*": true, + "**/.git": true, + "**/.ssh": true, + "**/*.lock": true + }, "search.exclude": { - "node_modules/**/*": true, - "target/**/*": true, - "sketch/**/*": true, - "**/sketch*": true, - "**/*sketch.*": true, - "**/.log": true, - "**/.lock": true + "**/node_modules/*": true, + "**/target/*": true, + "**/tmp": true, + "**/temp": true, + "**/.git": true, + "**/.ssh": true, + "**/.tmp": true, + "**/*.log": true, + "**/*.lock": true + }, + "files.watcherExclude": { + "**/node_modules/*": true, + "**/target/*": true, + "**/tmp": true, + "**/temp": true, + "**/.git": true, + "**/.ssh": true, + "**/.tmp": true, + "**/*.log": true, + "**/*.lock": true }, // Controls whether the coverage toolbar is shown in the editor. "testing.coverageToolbarEnabled": true, From 830646a5021e4288c8a74b905668058c4c910cec Mon Sep 17 00:00:00 2001 From: Juarez Rudsatz Date: Fri, 10 Oct 2025 14:34:22 -0300 Subject: [PATCH 3/9] build: add packaging info to Cargo.toml --- Cargo.toml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9e760d4..15a1ce6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "solrcopy" -version = "0.7.0" +version = "0.8.0" edition = "2024" rust-version = "1.85.1" @@ -8,11 +8,24 @@ authors = ["Juarez Rudsatz "] description = "Command line tool useful for migration, transformations, backup, and restore of documents stored inside cores of Apache Solr" homepage = "https://github.com/juarezr/solrcopy" repository = "https://github.com/juarezr/solrcopy" +documentation = "https://docs.rs/solrcopy" + license = "gpl-3.0-or-later" readme = "README.md" categories = ["command-line-utilities"] keywords = ["solr", "dataimport", "dih", "fulltext-search", "apache-solr", "data-engineering"] +exclude = [ + ".vscode/", + ".github/", + "coverage/", + "sketch/", + "Cargo.lock", + "**/sketch*", + "**/*.log", + "**/*.zip", +] + [dependencies] clap = { version = "4.5.*", features = ["derive", "env", "color"] } clap_complete = "4.5.*" @@ -46,6 +59,16 @@ travis-ci = { repository = "juarezr/solrcopy", branch = "master" } strip = "debuginfo" lto = true +[[bin]] +path = "src/main.rs" +name = "solrcopy" +bench = false +test = true +doc = true + +[lints.rust] +unsafe_code = "forbid" + # Shell completions are generated by running: # $ cargo run --release -- completion -all -o target @@ -82,7 +105,7 @@ assets = [ { source = "target/assets/solrcopy.bash", dest = "/usr/share/bash-completion/completions/solrcopy", mode = "644" }, { source = "target/assets/solrcopy.fish", dest = "/usr/share/fish/vendor_completions.d/solrcopy.fish", mode = "644" }, { source = "target/assets/_solrcopy", dest = "/usr/share/zsh/vendor-completions/", mode = "644" }, - { source = "target/assets/solrcopy.1", dest = "/usr/share/man/man1/", mode = "644"}, + { source = "target/assets/solrcopy.1", dest = "/usr/share/man/man1/", mode = "644" }, ] # [profile.release] From 7bef36d84888360d871dc2653059d9004fd10c5c Mon Sep 17 00:00:00 2001 From: Juarez Rudsatz Date: Fri, 10 Oct 2025 15:02:04 -0300 Subject: [PATCH 4/9] chore: refactor command cargo make coverage --- Makefile.toml | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/Makefile.toml b/Makefile.toml index 1bdac4b..c0a3b0e 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -129,12 +129,7 @@ run_task = { name = [ category = "Test Coverage" description = "Generate coverage for the source code test that does not require Solr" command = "cargo" -args = [ - "llvm-cov", - "--lcov", - "--output-path", - "coverage/lcov.info", -] +args = ["llvm-cov", "--lcov", "--output-path", "target/lcov.info"] [tasks.coverage-full] category = "Test Coverage" @@ -145,20 +140,14 @@ args = [ "--all-features", "--lcov", "--output-path", - "coverage/lcov.info", + "target/lcov.info", ] [tasks.coverage-report] category = "Test Coverage" description = "Generate a coverage report while testing Solr" command = "cargo" -args = [ - "llvm-cov", - "--all-features", - "--html", - "--output-dir", - "coverage", -] +args = ["llvm-cov", "--all-features", "--html", "--output-dir", "target/coverage-report"] [tasks.coverage] category = "Test Coverage" From 555a65071a902d0308d35114c1d23c0183ca56c7 Mon Sep 17 00:00:00 2001 From: Juarez Rudsatz Date: Fri, 10 Oct 2025 15:02:22 -0300 Subject: [PATCH 5/9] build: add cargo make publish --- Makefile.toml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Makefile.toml b/Makefile.toml index c0a3b0e..1c5f8fa 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -159,14 +159,30 @@ run_task = { name = [ #endregion Coverage -#region Lint +#region Publish [tasks.clean] -category = "Lint" +category = "Publish" description = "Clean all compiled artifacts" command = "cargo" args = ["clean"] +[tasks.verify] +category = "Publish" +description = "Verify packaging" +command = "cargo" +args = ["publish", "--dry-run", "--allow-dirty"] + +[tasks.publish] +category = "Publish" +description = "Publish to crates.io" +command = "cargo" +args = ["publish"] + +#endregion Publish + +#region Lint + [tasks.check-compile] category = "Lint" description = "Check if the source code compiles" From 95fa909e5171c965c2dce3902fd26a6d4ccc4f84 Mon Sep 17 00:00:00 2001 From: Juarez Rudsatz Date: Fri, 10 Oct 2025 15:13:42 -0300 Subject: [PATCH 6/9] chore: fix license in Cargo.toml --- Cargo.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 15a1ce6..424d148 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,11 +9,12 @@ description = "Command line tool useful for migration, transformations, backup, homepage = "https://github.com/juarezr/solrcopy" repository = "https://github.com/juarezr/solrcopy" documentation = "https://docs.rs/solrcopy" +license = "GPL-3.0-only" +# license-file = "LICENSE" -license = "gpl-3.0-or-later" readme = "README.md" categories = ["command-line-utilities"] -keywords = ["solr", "dataimport", "dih", "fulltext-search", "apache-solr", "data-engineering"] +keywords = ["solr", "dataimport", "fulltext-search", "apache-solr", "data-engineering"] exclude = [ ".vscode/", From ce1c448e6d4ae07a2eddb9aa834b7716bd3ae2e5 Mon Sep 17 00:00:00 2001 From: Juarez Rudsatz Date: Fri, 10 Oct 2025 15:51:05 -0300 Subject: [PATCH 7/9] ci: Verify if source code is ready to publish to crates.io --- .github/workflows/build-test-and-lint.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test-and-lint.yml b/.github/workflows/build-test-and-lint.yml index 273ed48..1c0034a 100644 --- a/.github/workflows/build-test-and-lint.yml +++ b/.github/workflows/build-test-and-lint.yml @@ -162,7 +162,7 @@ jobs: printf '\n## Future Incompatibilities Report\n\n' >> "${GITHUB_STEP_SUMMARY}"; - if cargo report future-incompatibilities --color never >> "${GITHUB_STEP_SUMMARY}"; then + if cargo report future-incompatibilities --color never >> "${GITHUB_STEP_SUMMARY}"; then echo "FUTURE_INCOMPATIBILITIES=1" >> "${GITHUB_OUTPUT}"; echo "::warning file=Cargo.toml,line=15,col=2,endColumn=24,title=FUTURE-INCOMPATIBILITIES::Future imcompatibilities found in source code or dependencies."; false; @@ -193,7 +193,7 @@ jobs: - name: Run coverage report if: matrix.os == 'ubuntu-latest' shell: bash - run: cargo llvm-cov --all-features --workspace --lcov --no-cfg-coverage-nightly --output-path lcov.info + run: cargo llvm-cov --all-features --lcov --output-path lcov.info - name: Coveralls if: matrix.os == 'ubuntu-latest' @@ -210,6 +210,15 @@ jobs: # endregion + # region Test Publishing + + - name: Verify if source code is ready to publish to crates.io + if: matrix.os == 'ubuntu-latest' + shell: bash + run: cargo publish --all-features --dry-run + + # endregion + deps: needs: ci runs-on: ubuntu-latest @@ -225,7 +234,7 @@ jobs: with: ref: ${{ inputs.branch_commit_or_ref || '' }} - - name: Update Rust toolchain from channel ${{ matrix.channel }} + - name: Update Rust toolchain from channel ${{ matrix.channel }} shell: bash run: | rustup self update From 01862ecdbffb2a72ca4273a9607cdd4537f24fc6 Mon Sep 17 00:00:00 2001 From: Juarez Rudsatz Date: Fri, 10 Oct 2025 15:51:38 -0300 Subject: [PATCH 8/9] ci: publish releases to crates.io --- .github/workflows/build-release.yml | 45 ++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 321e98f..210b8d5 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -44,15 +44,15 @@ jobs: TARGET_DIR: target/release ARTIFACT_DIR: target/artifacts ARTIFACT_NAME: solrcopy-${{ inputs.release_version_tag || github.event.release.tag_name }}-${{ matrix.target }} - + steps: # region Workflow information - + - name: Checkout sources uses: actions/checkout@v4 with: ref: ${{ inputs.branch_commit_or_ref || '' }} - + - name: Report Workflow Information id: workflow_report uses: ./.github/actions/workflow-info @@ -67,7 +67,7 @@ jobs: - Upload URL: ${{ github.event.release.upload_url }} # endregion - + # region Compiling - name: Rustup Self Update @@ -76,7 +76,7 @@ jobs: run: | rustup self update - - name: Update Rust toolchain from channel ${{ matrix.channel }} + - name: Update Rust toolchain from channel ${{ matrix.channel }} shell: bash run: | rustup update ${{ matrix.channel }} @@ -93,10 +93,10 @@ jobs: - name: Install cargo plugins if: matrix.platform == 'linux' shell: bash - run: cargo install cargo-deb cargo-generate-rpm + run: cargo install cargo-deb cargo-generate-rpm cargo-get # endregion - + # region Compiling - name: Create local artifact folders @@ -114,9 +114,9 @@ jobs: run: cargo build --release # endregion - + # region Packaging - + - name: Make a tar package for release (linux and macos) if: matrix.platform == 'linux' || matrix.platform == 'macos' shell: bash @@ -126,7 +126,7 @@ jobs: if: matrix.platform == 'linux' shell: bash run: cargo deb --profile release --verbose --no-build --output ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.deb - + - name: Make a rpm package if: matrix.platform == 'linux' shell: bash @@ -141,9 +141,19 @@ jobs: 7z a -y -tzip ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.zip ${{ env.TARGET_DIR }}/solrcopy.exe # endregion - - # region Upload Artifact - + + # region Upload Artifacts + + - name: Check release version number before publishing + if: matrix.os == 'ubuntu-latest' + shell: bash + run: | + CARGO_VERSION=$(cargo get package.version --pretty) + echo "CARGO_VERSION=$CARGO_VERSION" + echo "RELEASE_VERSION=${{ env.RELEASE_VERSION }}" + + test "$CARGO_VERSION" = "${{ env.RELEASE_VERSION }}" + - name: Upload Debian, RPM and tar.gz Packages if: matrix.platform == 'linux' env: @@ -178,4 +188,13 @@ jobs: # endregion + # region Publish + + - name: Publish to crates.io + if: matrix.os == 'ubuntu-latest' + shell: bash + run: cargo publish --all-features --token "${{ secrets.CRATESIO_GITHUB_SOLRCOPY_PUBLISH }}" + + # endregion + # end of file From 8d48d50cdc7a79425ba64c5ab88004051b75670d Mon Sep 17 00:00:00 2001 From: Juarez Rudsatz Date: Fri, 10 Oct 2025 15:52:27 -0300 Subject: [PATCH 9/9] chore: increment version to v0.8.1 to test releasing --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 424d148..9c0e22a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "solrcopy" -version = "0.8.0" +version = "0.8.1" edition = "2024" rust-version = "1.85.1"