Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial work on git2 stuff #34

Merged
merged 71 commits into from Feb 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
8d7891a
initial work on git2 stuff
jasonozias Feb 11, 2021
04c336c
tracking down error
jasonozias Feb 11, 2021
c0e8491
fixed detached head issue with branch
jasonozias Feb 11, 2021
ccb15ea
clippy lints
jasonozias Feb 11, 2021
27de776
fix broken tests with git feature disabled
jasonozias Feb 11, 2021
94ddaa8
fix clippy lint that's only in nightly
jasonozias Feb 11, 2021
16c623e
testing
Feb 11, 2021
692fca0
feature coverage
Feb 11, 2021
179775f
enum iterator
Feb 11, 2021
13e4e97
error test coverage
Feb 11, 2021
70c8d41
error test coverage
Feb 11, 2021
1269c96
error test coverage
Feb 11, 2021
ad8d2f6
restructure impl Config for features
jasonozias Feb 11, 2021
fd78e90
add submodule repo for testing
jasonozias Feb 11, 2021
1d93286
removed submodule to re-add from github
jasonozias Feb 11, 2021
42c1312
Updated to use submodule from github
jasonozias Feb 11, 2021
1e2e7a8
refactored gen back to toplevel
jasonozias Feb 11, 2021
0e45e8f
checkout master in submodule to cover regular branch name
jasonozias Feb 11, 2021
e10f509
typo in .travis.yml
jasonozias Feb 11, 2021
60d78f8
another bug in .travis.yml
jasonozias Feb 11, 2021
93204e0
added another repo for 'git describe' testing
jasonozias Feb 11, 2021
983b547
fixed shadowing bug in vergen::Error
jasonozias Feb 11, 2021
9143866
convert_err introduced
jasonozias Feb 11, 2021
97bac6d
initial gen output, some error refactoring
jasonozias Feb 11, 2021
9f5fe07
feature snafu
jasonozias Feb 11, 2021
e53c285
another feature snafu
jasonozias Feb 11, 2021
4410652
refactor for better coverage
jasonozias Feb 11, 2021
f31424c
better semver
jasonozias Feb 11, 2021
8b29751
fetch tags in submodules for testing
jasonozias Feb 11, 2021
45b4d8a
remove old output
jasonozias Feb 12, 2021
880ecce
fixed feature snafus
jasonozias Feb 12, 2021
55ec279
feature test, formatting
jasonozias Feb 12, 2021
86ee755
removed unused constants, added rustc commit has
jasonozias Feb 12, 2021
95fc0f5
Added remaining rustc meta
jasonozias Feb 12, 2021
21a2365
docs, constant normalization
jasonozias Feb 12, 2021
38eb91e
fixed feature snafus
jasonozias Feb 12, 2021
dac926c
clippy lints, windows test fix
CraZySacX Feb 12, 2021
d618930
testing
Feb 12, 2021
6cf4a5c
README.md
Feb 12, 2021
d3c3c4a
Removed un-needed extern crate from doc example
CraZySacX Feb 12, 2021
7e19856
more extensive testing for git instructions
CraZySacX Feb 12, 2021
f11d08f
added some feature fun to lib.rs
CraZySacX Feb 12, 2021
b4e3b02
cargo fmt
CraZySacX Feb 12, 2021
62a57a8
cargo fmt
CraZySacX Feb 12, 2021
063d028
Check that removed key returns empty string
CraZySacX Feb 12, 2021
43c4c10
initial actions
CraZySacX Feb 12, 2021
aec283e
actions, moar actions
CraZySacX Feb 12, 2021
27f3ac2
Update README.md
CraZySacX Feb 12, 2021
d6b3aaa
trying the tarpaulin
CraZySacX Feb 12, 2021
b181c5a
tarpaulin only on linux
CraZySacX Feb 12, 2021
0c82f55
tarpaulin only on linux
CraZySacX Feb 12, 2021
44de206
codecov
CraZySacX Feb 12, 2021
78c1ab9
Update README.md
CraZySacX Feb 12, 2021
6dae710
Update README.md
CraZySacX Feb 12, 2021
bb5f670
more actions work
CraZySacX Feb 12, 2021
738959f
added detached head test
CraZySacX Feb 12, 2021
8a4a2f5
stupid stuff
CraZySacX Feb 12, 2021
fb4d6e1
cache ~/.cargo/bin dir
CraZySacX Feb 12, 2021
b616fe6
remove travis and gitlab config
CraZySacX Feb 12, 2021
42d55ee
allow to continue if install fails, likely because already exists
CraZySacX Feb 12, 2021
04ba99e
added support for cargo-all-features
CraZySacX Feb 12, 2021
88c7502
added clippy
CraZySacX Feb 12, 2021
c6e1888
cargo-all-features in all of matrix
CraZySacX Feb 12, 2021
155c900
updated caching
CraZySacX Feb 13, 2021
f0ace16
Chaged hashfile for cache for library
CraZySacX Feb 13, 2021
2dbf1c2
cache key update, reordered so Cargo.toml exists for cache
CraZySacX Feb 13, 2021
3c1116f
additional instruction testing
CraZySacX Feb 13, 2021
056b743
tweaking cache again, causing failed builds
CraZySacX Feb 13, 2021
0aeb6de
added rustversion to support testing diffs between nightly and beta/s…
CraZySacX Feb 13, 2021
55dc81e
added single toggle check. todo to make macro to check more toggles
CraZySacX Feb 13, 2021
04aa8ab
cargo fmt
CraZySacX Feb 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
104 changes: 104 additions & 0 deletions .github/workflows/main.yml
@@ -0,0 +1,104 @@
on: [push]

name: CI

jobs:
test:
name: vergen
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
rust: stable
other: i686-unknown-linux-gnu
- os: ubuntu-latest
rust: beta
other: i686-unknown-linux-gnu
- os: ubuntu-latest
rust: nightly
other: i686-unknown-linux-gnu
- os: macos-latest
rust: stable
other: x86_64-apple-ios
- os: macos-latest
rust: beta
other: x86_64-apple-ios
- os: macos-latest
rust: nightly
other: x86_64-apple-ios
- os: windows-latest
rust: stable-msvc
other: i686-pc-windows-msvc
- os: windows-latest
rust: beta-msvc
other: i686-pc-windows-msvc
- os: windows-latest
rust: nightly-msvc
other: i686-pc-windows-msvc
- os: windows-latest
rust: stable-gnu
other: i686-pc-windows-gnu
- os: windows-latest
rust: beta-gnu
other: i686-pc-windows-gnu
- os: windows-latest
rust: nightly-gnu
other: i686-pc-windows-gnu
steps:
- name: ✔️ Checkout ✔️
uses: actions/checkout@v2
with:
submodules: recursive
- name: 💵 Cache 💵
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/cargo-tarpaulin*
~/.cargo/bin/cargo-*-all-features*
key: ${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }}
- name: ✔️ Checkout (notagsrepo master) ✔️
run: cd testdata/notagsrepo && git checkout master && cd ..
- name: ✔️ Checkout (tagsrepo master) ✔️
run: cd testdata/tagsrepo && git checkout master && cd ..
- name: ✔️ Checkout (detachedhead v0.0.1) ✔️
run: cd testdata/detachedhead && git checkout v0.0.1 && cd ..
- name: 🐕 Fetch 🐕
run: git submodule foreach --recursive 'git fetch --tags'
- name: 💾 Install (cargo-tarpaulin) 💾
uses: actions-rs/install@v0.1
if: matrix.os == 'ubuntu-latest'
with:
crate: cargo-tarpaulin
version: latest
use-tool-cache: true
continue-on-error: true
- name: 💾 Install (cargo-all-features) 💾
uses: actions-rs/install@v0.1
with:
crate: cargo-all-features
version: latest
use-tool-cache: true
continue-on-error: true
- name: 📅 Update 📅
run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- name: ➕ Add ➕
run: rustup component add rustfmt || echo "rustfmt not available"
- name: ➕ Add ➕
run: rustup component add clippy || echo "clippy not available"
- name: ☢️ Formatting ☢️
run: cargo fmt --all -- --check
- name: 🕳️ Lints 🕳️
run: cargo clippy --all -- -D warnings
- name: 🏗️ Build 🏗️
run: cargo build-all-features
- name: 🧪 Test 🧪
run: cargo test-all-features
- name: 🙊 Code Coverage 🙊
if: matrix.os == 'ubuntu-latest'
run: cargo tarpaulin --out Xml
- name: 🙊 Upload Code Coverage 🙊
uses: codecov/codecov-action@v1
if: matrix.os == 'ubuntu-latest'
with:
files: ./cobertura.xml
33 changes: 0 additions & 33 deletions .gitlab-ci.yml

This file was deleted.

9 changes: 9 additions & 0 deletions .gitmodules
@@ -0,0 +1,9 @@
[submodule "testdata/notagsrepo"]
path = testdata/notagsrepo
url = https://github.com/rustyhorde/notagsrepo.git
[submodule "testdata/tagsrepo"]
path = testdata/tagsrepo
url = https://github.com/rustyhorde/tagsrepo.git
[submodule "testdata/detachedhead"]
path = testdata/detachedhead
url = https://github.com/rustyhorde/detachedhead.git
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

25 changes: 22 additions & 3 deletions Cargo.toml
Expand Up @@ -12,10 +12,29 @@ readme = "README.md"
repository = "https://github.com/rustyhorde/vergen"
version = "3.2.0"

[features]
default = ["build", "git", "rustc"]
build = ["chrono"]
git = ["chrono", "git2"]
rustc = ["rustc_version"]

[dependencies]
bitflags = "1"
chrono = "0"
rustc_version = "0"
chrono = { version = "0", optional = true }
getset = "0"
git2 = { version = "0", optional = true }
rustc_version = { version = "0", optional = true }
serde = "1"
serde_derive = "1"
enum-iterator = "0.6.0"

[build-dependencies]
chrono = "0"
chrono = "0"

[dev-dependencies]
lazy_static = "1"
regex = "1"
rustversion = "1"

[package.metadata.cargo-all-features]
skip_optional_dependencies = true
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -7,15 +7,15 @@
## Build Status
| | |
---------------|-----------------------------------------------------------------------------------|
| Github | ![CI](https://github.com/rustyhorde/vergen/workflows/CI/badge.svg) |
| Travis | [![Build Status](https://travis-ci.com/rustyhorde/vergen.svg?branch=master)](https://travis-ci.com/rustyhorde/vergen)|
| GitLab CI/CD | [![pipeline status](https://gitlab.com/rustyhorde/vergen/badges/master/pipeline.svg)](https://gitlab.com/rustyhorde/vergen/commits/master)|
| Appveyor | [![Build status](https://ci.appveyor.com/api/projects/status/fjliwvxqayyecl1j?svg=true)](https://ci.appveyor.com/project/CraZySacX/vergen)|

## Code Coverage
[![codecov](https://codecov.io/gh/rustyhorde/vergen/branch/master/graph/badge.svg?token=cBXro7o2UN)](https://codecov.io/gh/rustyhorde/vergen)
[![Coverage Status](https://coveralls.io/repos/github/rustyhorde/vergen/badge.svg?branch=master)](https://coveralls.io/github/rustyhorde/vergen?branch=master)

## Documentation
[Documentation](https://docs.rs/vergen)
[Documentation](https://docs.rs/vergen) can be found on [docs.rs](https://docs.rs/vergen)

## Example Usage
See the documentation at [docs.rs](https://docs.rs/vergen/3.2.0/vergen/#cargo-key-build-script-output) for example usage
Expand Down
129 changes: 0 additions & 129 deletions appveyor.yml

This file was deleted.

5 changes: 4 additions & 1 deletion build.rs
@@ -1,7 +1,10 @@
use chrono::Utc;

pub fn main() {
let now = chrono::Utc::now();
let now = Utc::now();
println!(
"cargo:rustc-env=VERGEN_BUILD_TIMESTAMP={}",
now.to_rfc3339()
);
println!("cargo:rustc-env=VERGEN_GIT_SEMVER=v3.2.0-86-g95fc0f5");
}