-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Publish crate | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
publish: | ||
name: Publish crate | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Update version number | ||
shell: bash | ||
run: | | ||
version="${GITHUB_REF#*/v}" | ||
sed -i -e "/^version =/s/=.*/= \"${version}\"/" Cargo.toml | ||
cargo check | ||
- name: Commit changes | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
git commit -m "Update version number" Cargo.toml Cargo.lock | ||
- name: Publish | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }} | ||
run: cargo publish --locked |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ env: | |
|
||
jobs: | ||
test: | ||
name: Lint and test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*.profraw | ||
*.swp | ||
.DS_Store | ||
/.vscode | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Parser for PostgreSQL dumps in custom format | ||
|
||
This crate allows inspecting the contents of a PostgreSQL backup | ||
as made using `pg_dump -Fc` or `pg_dump --format=custom`, and provides | ||
direct access all raw table data. This can be useful if you do not | ||
trust the SQL statements embedded in the dump, or if you want to | ||
process data without loading it into a database. | ||
|
||
```rust | ||
use std::fs::File; | ||
use pgarchive::Archive; | ||
|
||
let mut file = File::open("tests/test.pgdump").unwrap(); | ||
match Archive::parse(&mut file) { | ||
Ok(archive) => println!("This is a backup of {}", archive.database_name), | ||
Err(e) => println!("can not read file: {:?}", e), | ||
}; | ||
``` |