Coder Social home page Coder Social logo

carve's Introduction

carve

carve is a command that rewrites the tag text in a file based on the git tag.

worked example

$ git describe --tags --abbrev=0
v0.0.1
$ git tag v0.0.2 # add new tag
$ carve . pkg/version.go sample.yml # rewrite file versions
v0.0.1 -> v0.0.2
$ git diff

diff --git a/.versions b/.versions
index 95e94cd..90ab6e9 100644
--- a/.versions
+++ b/.versions
@@ -1 +1 @@
-v0.0.1
\ No newline at end of file
+v0.0.2
\ No newline at end of file
diff --git a/pkg/version.go b/pkg/version.go
index 06d51ad..6b5d02c 100644
--- a/pkg/version.go
+++ b/pkg/version.go
@@ -1,3 +1,3 @@
 package carve

-const Version = "v0.0.1"
+const Version = "v0.0.2"
diff --git a/sample.yml b/sample.yml
index 19979e6..3910b1e 100644
--- a/sample.yml
+++ b/sample.yml
@@ -2,7 +2,7 @@

 info:
   description: carve
-  version: v0.0.1
+  version: v0.0.2
   title: API Docs
   contact:
     name: kijimad

install

$ go install github.com/kijimaD/carve@main

usage

carve . pkg/version.go sample.yml

carve [repo] [oldtext] [target files...]

docker run

$ docker run -v "$PWD/":/work -w /work --rm -it ghcr.io/kijimad/carve:latest

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.