Skip to content

Commit

Permalink
fix(fix): fix \n\n Version: release/0.1.1 \n\n fix \n\n - DEPLOY.sh
Browse files Browse the repository at this point in the history
- README.md
- docs/README.html
- docs/index.html
- docs/index.html.bak  LazyOwn on HackTheBox: https://app.hackthebox.com/teams/overview/6429 \n\n  LazyOwn/   https://grisuno.github.io/LazyOwn/ \n\n \n\n Fecha: Thu Aug 15 03:50:40 2024 -0400 \n\n Hora: 1723708240
  • Loading branch information
grisuno committed Aug 15, 2024
1 parent b18c3e2 commit 1ffea7a
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 36 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

# Changelog

### Correcciones

* fix(fix): versionamiento \n\n Version: \n\n \n\n - DEPLOY.sh - README.md - docs/README.html - docs/index.html - docs/index.html.bak LazyOwn on HackTheBox: https://app.hackthebox.com/teams/overview/6429 \n\n LazyOwn/ https://grisuno.github.io/LazyOwn/ \n\n \n\n Fecha: Thu Aug 15 03:44:46 2024 -0400 \n\n Hora: 1723707886

### Correcciones

* fix(fix): fix en los tags \n\n Version: \n\n \n\n - README.md - docs/README.html - docs/index.html - docs/index.html.bak LazyOwn on HackTheBox: https://app.hackthebox.com/teams/overview/6429 \n\n LazyOwn/ https://grisuno.github.io/LazyOwn/ \n\n \n\n Fecha: Thu Aug 15 03:40:26 2024 -0400 \n\n Hora: 1723707626
Expand Down
28 changes: 9 additions & 19 deletions DEPLOY.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,13 @@
readonly CHANGELOG_FILE="CHANGELOG.md"
readonly README_FILE="README.md"

# Función para incrementar la versión
increment_version() {
local version=$1
local increment_type=${2:-"patch"} # default to patch

# Validate the version format
if ! [[ $version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
echo "Invalid version format: $version" >&2
return 1
fi
local major minor patch
IFS='.' read -r major minor patch <<< "$version"

# Extract major, minor, and patch parts from the version
local major="${BASH_REMATCH[1]}"
local minor="${BASH_REMATCH[2]}"
local patch="${BASH_REMATCH[3]}"
local increment_type=${2:-"patch"} # default to patch

# Increment the appropriate version component
case $increment_type in
major)
((major++))
Expand All @@ -40,8 +30,7 @@ increment_version() {
;;
esac

# Ensure the version parts are zero-padded to two digits
printf "%d.%02d.%02d\n" "$major" "$minor" "$patch"
echo "$major.$minor.$patch"
}

# Obtener la versión actual
Expand Down Expand Up @@ -107,26 +96,27 @@ FOOTER=" LazyOwn on HackTheBox: https://app.hackthebox.com/teams/overview/6429 \
# Determinar el incremento de versión basado en el tipo de commit
case $TYPE in
feat|feature|fix|hotfix)
# Cambios menores y correcciones
# Incrementar el número de parche
NEW_VERSION=$(increment_version $CURRENT_VERSION "patch")
;;
refactor|docs|test)
# Cambios que no afectan la funcionalidad del software
# No cambiar la versión
NEW_VERSION=$CURRENT_VERSION
;;
release)
# Incrementar el número mayor y reiniciar los números menores y de parche a 0
# Incrementar el número mayor y reiniciar los números menor y parche a 0
NEW_VERSION=$(increment_version $CURRENT_VERSION "major")
;;
patch)
# Cambiar el número menor
# Incrementar el número menor
NEW_VERSION=$(increment_version $CURRENT_VERSION "minor")
;;
*)
echo "Invalid commit type: $TYPE" >&2
exit 1
;;
esac

echo "{\"version\": \"$NEW_VERSION\"}" > version.json
git -C . add version.json

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5166,6 +5166,10 @@ Raises:

# Changelog

### Correcciones

* fix(fix): fix en los tags \n\n Version: \n\n \n\n - README.md - docs/README.html - docs/index.html - docs/index.html.bak LazyOwn on HackTheBox: https://app.hackthebox.com/teams/overview/6429 \n\n LazyOwn/ https://grisuno.github.io/LazyOwn/ \n\n \n\n Fecha: Thu Aug 15 03:40:26 2024 -0400 \n\n Hora: 1723707626

### Correcciones

* fix(version file): \n\n Version: \n\n \n\n - README.md - docs/README.html - docs/index.html - docs/index.html.bak LazyOwn on HackTheBox: https://app.hackthebox.com/teams/overview/6429 \n\n LazyOwn/ https://grisuno.github.io/LazyOwn/ \n\n \n\n Fecha: Thu Aug 15 03:37:59 2024 -0400 \n\n Hora: 1723707479
Expand Down
18 changes: 13 additions & 5 deletions docs/CHANGELOG.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,45 +175,53 @@ <h1 class="title">CHANGELOG LazyOwn Framework Pentesting t00lz</h1>
<h1 id="changelog">Changelog</h1>
<h3 id="correcciones">Correcciones</h3>
<ul>
<li>fix(fix): versionamiento Version: - DEPLOY.sh - README.md -
docs/README.html - docs/index.html - docs/index.html.bak LazyOwn on
HackTheBox: https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:44:46 2024 -0400
Hora: 1723707886</li>
</ul>
<h3 id="correcciones-1">Correcciones</h3>
<ul>
<li>fix(fix): fix en los tags Version: - README.md - docs/README.html -
docs/index.html - docs/index.html.bak LazyOwn on HackTheBox:
https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:40:26 2024 -0400
Hora: 1723707626</li>
</ul>
<h3 id="correcciones-1">Correcciones</h3>
<h3 id="correcciones-2">Correcciones</h3>
<ul>
<li>fix(version file): Version: - README.md - docs/README.html -
docs/index.html - docs/index.html.bak LazyOwn on HackTheBox:
https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:37:59 2024 -0400
Hora: 1723707479</li>
</ul>
<h3 id="correcciones-2">Correcciones</h3>
<h3 id="correcciones-3">Correcciones</h3>
<ul>
<li>fix(pandoc): command Version: bad arguments - DEPLOY.sh - README.md
- docs/README.html - docs/index.html - docs/index.html.bak LazyOwn on
HackTheBox: https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:36:55 2024 -0400
Hora: 1723707415</li>
</ul>
<h3 id="correcciones-3">Correcciones</h3>
<h3 id="correcciones-4">Correcciones</h3>
<ul>
<li>fix(fix): changelog Version: :D - DEPLOY.sh - README.md -
docs/README.html - docs/index.html - docs/index.html.bak LazyOwn on
HackTheBox: https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:31:11 2024 -0400
Hora: 1723707071</li>
</ul>
<h3 id="correcciones-4">Correcciones</h3>
<h3 id="correcciones-5">Correcciones</h3>
<ul>
<li>fix(fixing): fixin bug in formating of changelog Version: :D -
DEPLOY.sh - README.md - docs/README.html - docs/index.html LazyOwn on
HackTheBox: https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:26:33 2024 -0400
Hora: 1723706793</li>
</ul>
<h3 id="correcciones-5">Correcciones</h3>
<h3 id="correcciones-6">Correcciones</h3>
<ul>
<li>fix(fixing): fixing semantic version Version: implemented -
DEPLOY.sh - README.md - docs/README.html - docs/index.html -
Expand Down
16 changes: 12 additions & 4 deletions docs/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -3927,37 +3927,45 @@ <h2 id="pwd">pwd</h2>
<h1 id="changelog">Changelog</h1>
<h3 id="correcciones">Correcciones</h3>
<ul>
<li>fix(fix): fix en los tags Version: - README.md - docs/README.html -
docs/index.html - docs/index.html.bak LazyOwn on HackTheBox:
https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:40:26 2024 -0400
Hora: 1723707626</li>
</ul>
<h3 id="correcciones-1">Correcciones</h3>
<ul>
<li>fix(version file): Version: - README.md - docs/README.html -
docs/index.html - docs/index.html.bak LazyOwn on HackTheBox:
https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:37:59 2024 -0400
Hora: 1723707479</li>
</ul>
<h3 id="correcciones-1">Correcciones</h3>
<h3 id="correcciones-2">Correcciones</h3>
<ul>
<li>fix(pandoc): command Version: bad arguments - DEPLOY.sh - README.md
- docs/README.html - docs/index.html - docs/index.html.bak LazyOwn on
HackTheBox: https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:36:55 2024 -0400
Hora: 1723707415</li>
</ul>
<h3 id="correcciones-2">Correcciones</h3>
<h3 id="correcciones-3">Correcciones</h3>
<ul>
<li>fix(fix): changelog Version: :D - DEPLOY.sh - README.md -
docs/README.html - docs/index.html - docs/index.html.bak LazyOwn on
HackTheBox: https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:31:11 2024 -0400
Hora: 1723707071</li>
</ul>
<h3 id="correcciones-3">Correcciones</h3>
<h3 id="correcciones-4">Correcciones</h3>
<ul>
<li>fix(fixing): fixin bug in formating of changelog Version: :D -
DEPLOY.sh - README.md - docs/README.html - docs/index.html LazyOwn on
HackTheBox: https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:26:33 2024 -0400
Hora: 1723706793</li>
</ul>
<h3 id="correcciones-4">Correcciones</h3>
<h3 id="correcciones-5">Correcciones</h3>
<ul>
<li>fix(fixing): fixing semantic version Version: implemented -
DEPLOY.sh - README.md - docs/README.html - docs/index.html -
Expand Down
16 changes: 12 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4142,37 +4142,45 @@ <h2 id="pwd">pwd</h2>
<h1 id="changelog">Changelog</h1>
<h3 id="correcciones">Correcciones</h3>
<ul>
<li>fix(fix): fix en los tags Version: - README.md - docs/README.html -
docs/index.html - docs/index.html.bak LazyOwn on HackTheBox:
https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:40:26 2024 -0400
Hora: 1723707626</li>
</ul>
<h3 id="correcciones-1">Correcciones</h3>
<ul>
<li>fix(version file): Version: - README.md - docs/README.html -
docs/index.html - docs/index.html.bak LazyOwn on HackTheBox:
https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:37:59 2024 -0400
Hora: 1723707479</li>
</ul>
<h3 id="correcciones-1">Correcciones</h3>
<h3 id="correcciones-2">Correcciones</h3>
<ul>
<li>fix(pandoc): command Version: bad arguments - DEPLOY.sh - README.md
- docs/README.html - docs/index.html - docs/index.html.bak LazyOwn on
HackTheBox: https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:36:55 2024 -0400
Hora: 1723707415</li>
</ul>
<h3 id="correcciones-2">Correcciones</h3>
<h3 id="correcciones-3">Correcciones</h3>
<ul>
<li>fix(fix): changelog Version: :D - DEPLOY.sh - README.md -
docs/README.html - docs/index.html - docs/index.html.bak LazyOwn on
HackTheBox: https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:31:11 2024 -0400
Hora: 1723707071</li>
</ul>
<h3 id="correcciones-3">Correcciones</h3>
<h3 id="correcciones-4">Correcciones</h3>
<ul>
<li>fix(fixing): fixin bug in formating of changelog Version: :D -
DEPLOY.sh - README.md - docs/README.html - docs/index.html LazyOwn on
HackTheBox: https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:26:33 2024 -0400
Hora: 1723706793</li>
</ul>
<h3 id="correcciones-4">Correcciones</h3>
<h3 id="correcciones-5">Correcciones</h3>
<ul>
<li>fix(fixing): fixing semantic version Version: implemented -
DEPLOY.sh - README.md - docs/README.html - docs/index.html -
Expand Down
14 changes: 11 additions & 3 deletions docs/index.html.bak
Original file line number Diff line number Diff line change
Expand Up @@ -4142,29 +4142,37 @@ the scope where this function is used.</p>
<h1 id="changelog">Changelog</h1>
<h3 id="correcciones">Correcciones</h3>
<ul>
<li>fix(version file): Version: - README.md - docs/README.html -
docs/index.html - docs/index.html.bak LazyOwn on HackTheBox:
https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:37:59 2024 -0400
Hora: 1723707479</li>
</ul>
<h3 id="correcciones-1">Correcciones</h3>
<ul>
<li>fix(pandoc): command Version: bad arguments - DEPLOY.sh - README.md
- docs/README.html - docs/index.html - docs/index.html.bak LazyOwn on
HackTheBox: https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:36:55 2024 -0400
Hora: 1723707415</li>
</ul>
<h3 id="correcciones-1">Correcciones</h3>
<h3 id="correcciones-2">Correcciones</h3>
<ul>
<li>fix(fix): changelog Version: :D - DEPLOY.sh - README.md -
docs/README.html - docs/index.html - docs/index.html.bak LazyOwn on
HackTheBox: https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:31:11 2024 -0400
Hora: 1723707071</li>
</ul>
<h3 id="correcciones-2">Correcciones</h3>
<h3 id="correcciones-3">Correcciones</h3>
<ul>
<li>fix(fixing): fixin bug in formating of changelog Version: :D -
DEPLOY.sh - README.md - docs/README.html - docs/index.html LazyOwn on
HackTheBox: https://app.hackthebox.com/teams/overview/6429 LazyOwn/
https://grisuno.github.io/LazyOwn/ Fecha: Thu Aug 15 03:26:33 2024 -0400
Hora: 1723706793</li>
</ul>
<h3 id="correcciones-3">Correcciones</h3>
<h3 id="correcciones-4">Correcciones</h3>
<ul>
<li>fix(fixing): fixing semantic version Version: implemented -
DEPLOY.sh - README.md - docs/README.html - docs/index.html -
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version": ""}
{"version": "release/0.1.1"}

0 comments on commit 1ffea7a

Please sign in to comment.