Code Monkey home page Code Monkey logo

artifact-versioning's Introduction

Artifact Versioning

Usage

Want to skip all this small talk and read directly how to use this? Go here.

Want to contribute? Check out developer notesTODO.

tl; dr

Artifact Versioning is a calendar versioning utility for your local and CI builds, taking in account SCM branching ( master / main branches are calculated without suffixes).

Currently supported versioning schema is YYYY.0W[. BRANCH_SUFFIX]. MICRO , as this is, specifically, versioning schema I've needed for my projects. If you need other versioning schema, either request it via issues or submit a PR and it will be considered for implementation.

Why?

Based on the situation in real life with projects I work on, which have common versioning requirement but use different toolkit and different implementations to achieve the same funcitonality. I am encountering on almost daily basis versioning calculation written in languages like Groovy (for Gradle and/or Jenkins), Python, Ruby, different shell flavors and who knows what else is somewhere in the source code repositories...

I have opted to write an implementation in Go, hoping I could use it as a replacement for all of the different implementations I run into.

Why not simply staying with shell scripts?

While reasonably widespread shell (not unlike bash ) is relatively universal approach and seems reasonable for a task like this - I've still felt a need to rewrite it in something else which can be used equally or more universally across use-cases and platforms.

First problem with shell scripting is - a platform. While I think I wasn't made to work with any kind of Windows-based servers for two decades by now (Exchange which I've used via Outlook excluded), and my personal workstations are not running any flavor of Windows for almost the same time period - I acknowledge Windows exist. And not everyone is working solely under Windows' WSL.

Second big problem with shell scripting, when used to implement even remotely complex logic, is maintainability. Shell scripting is by now more than half-century old technology, and it shows. Also, it is not a full blown programming language by definition, so a lot of relatively routine operations in any other language are with shell scripting done by invoking external utilities. That and more results in the fact that most of the developers I've worked with in my life are not fans of maintaining complex shell scripts (to put it mildly).

Why Go?

Well, to to be honest - I've mainly wanted to write some Go code as a part of my learning process to learn new programming language.

But beyond that, Go has couple of advantages which make it (or its executable outputs) ideal for this specific use-case and problem I've wanted to solve.

Obviously, even vaguely complex codebase is more maintainable in the "proper" programming language than when implemented in shell scripts.

Furthermore, Go is truly portable. Many languages today promise "write once, run everywhere", and they do deliver to some extent. But Go goes beyond that. Foundationally, from the inception, Go supports cross-platform compiling and it has been only improving ever since. This makes compiling and distribution of the executables built with Go a breeze.

artifact-versioning's People

Contributors

casastorta avatar

Watchers

 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.