Skip to content

Instantly share code, notes, and snippets.

View Dari4sho's full-sized avatar

Dariyousch Käther Dari4sho

  • Jameda GmbH / Docplanner Group
  • Munich
View GitHub Profile
@Dari4sho
Dari4sho / auto-increment-version.sh
Last active May 20, 2023 23:36 — forked from CSTDev/auto-increment-version.sh
Script that will find the last Git Tag and increment it. It will only increment when the latest commit does not already have a tag. By default it increments the patch number, you can tell it to change the major or minor versions by adding #major or #minor to the commit message.
#!/bin/bash
tag_prefix="client-v"
# Get the highest tag number
latest_tag=$(git describe --abbrev=0 --tags)
# Extract the prefix and version using regular expression
if [[ $latest_tag =~ ^(.*$tag_prefix)(.*)$ ]]; then
prefix="${BASH_REMATCH[1]}"
/*
* Customized by Misato Takahashi <misato@takahashi.name>
* - fix if Html document has "<!DOCTYPE>" then parse error.
* - fix if Attribute name includes "-" then parse error
* - fix if Unmatch case start tag and end tag then parse error
* - add function "getElementById"
*
* HTML Parser By John Resig (ejohn.org)
* Original code by Erik Arvidsson, Mozilla Public License
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
<?php
/*
Made by Kudusch (blog.kudusch.de, kudusch.de, @Kudusch)
---------
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>