safety-guard 0.1.2

Proc macro for safety attribute
Documentation
image: stellarbullet/x86_64-unknown-linux-gnu:stable

stages:
  - test
  - deploy
  
cache:
  key: $CI_JOB_NAME
  paths:
    - $CARGO_HOME/registry
    - target

stable:
    stage: test
    script:
        - cargo test
        
beta:
    image: stellarbullet/x86_64-unknown-linux-gnu:beta
    stage: test
    script:
        - cargo test
        
nightly:
    image: stellarbullet/x86_64-unknown-linux-gnu:nightly
    stage: test
    allow_failure: true
    script:
        - cargo fmt -- --check
        - cargo test

badges:
  stage: deploy
  script:
    - LOC=$(cloc --json . | jq -r '.Rust.code')
    - curl -X PUT -d image_url="https://img.shields.io/badge/LOC-$LOC-blue.svg" -H "Private-Token:$ACCESS_TOKEN" "https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/badges/$LOC_BADGE_ID"

    - RUSTC_VERSION=$(rustc --version | awk '{ print $2 }')
    - curl -X PUT -d image_url="https://img.shields.io/badge/Rust-${RUSTC_VERSION//-/--}-orange.svg" -H "Private-Token:$ACCESS_TOKEN" "https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/badges/$RUST_BADGE_ID"
  only:
    - tags