Coder Social home page Coder Social logo

olivierh59500 / stork Goto Github PK

View Code? Open in Web Editor NEW

This project forked from evilsocket/stork

0.0 0.0 0.0 29 KB

A small utility that aims to automate and simplify some tasks related to software release cycles.

License: Other

Makefile 1.32% Go 98.68%

stork's Introduction

Stork is a small utility that aims to automate and simplify some tasks related to software release cycles such as reading the current version from a file, prompt for a new version, create and push git tags and so on.

Install

# make sure go modules are used
GO111MODULE=on go get github.com/evilsocket/stork/cmd/stork

You can run a file with stork -f /path/to/file.stork, use stork -h for a list of all the options.

Example

This stork script will parse the current version from example_version.go, then ask the user for a new version and update this file. It will then push the changes to git and create a new tag with the specified version. The last two lines will build, tag and push the docker image for the project.

#!/usr/bin/env stork -f
version:file "example_version.go"
version:from_user

git:create_tag $VERSION

docker:build "example/project", ".", "latest"
docker:create_tag "example/project", $VERSION, "latest"

More in the examples folder.

Commands

Shell

shell:do "<COMMAND>"

Execute a command with the current $SHELL.

Version

version:file "<FILE NAME>"

Read the current version from the specified file, sets $VERSION and $VERSION_FILE.

version:read "<FILE NAME>", "<VAR NAME>"

Read a version string from the specified file and sets $<VAR_NAME> with it.

version:parser "<EXPRESSION>"

Set the regular expression used by version:file and version:read to parse the version string. Default to [Vv]ersion\\s*=\\s*['\"]([\\d\\.ab]+)[\"'].

Read the version from the specified file and sets $<VAR_NAME>.

version:from_user

Ask the user for a new version, updates $VERSION and $VERSION_FILE with the new value.

Git

git:create_tag $VERSION or git:create_tag "<VERSION>"

Create and push a new git tag.

Docker

docker:repository "<REPOSITORY URL>"

Set the repository URL for pushing docker images.

docker:build "<IMAGE NAME>", "<PATH>", "<TAG>"

Build a docker image from a given path and tag it with the specified tag.

docker:create_tag "<IMAGE NAME>", "<SOURCE TAG>", "<TARGET TAG>"

Create and push a new tagged image from a source tag.

License

Released under the GPL3 license.

stork's People

Contributors

evilsocket avatar

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.