Skip to content

Commit

Permalink
fix: bump version to 0.6.0 and fix minimal errors in husky
Browse files Browse the repository at this point in the history
This version provides the docs automatic publishing workflow and fixes some bugs in
prepare-commit-msg that ocurred only whenn running commits in some particular ways.
  • Loading branch information
alanrodas committed Dec 28, 2023
1 parent 4bd640c commit ee3c04e
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 17 deletions.
10 changes: 5 additions & 5 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,33 @@ echo "**************************";
echo "";

# Check if we are doing an amend
if [ -n $COMMIT_SOURCE ] && [ $COMMIT_SOURCE = 'commit' ] && [ -n $SHA1 ]; then
if [ "$COMMIT_SOURCE" = 'commit' ] && [ -n $SHA1 ]; then
# Amends do not call the "cz" command.
exit 0;
fi

# Check if we are doing an squash
if [ -n $COMMIT_SOURCE ] && [ $COMMIT_SOURCE = 'squash' ]; then
if [ "$COMMIT_SOURCE" = 'squash' ]; then
# Squashes should not trigger the cz command.
exit 0;
fi

# Check if we are doing an merge
if [ -n $COMMIT_SOURCE ] && [ $COMMIT_SOURCE = 'merge' ]; then
if [ "$COMMIT_SOURCE" = 'merge' ]; then
# Merging should not trigger the cz command.
exit 0;
fi

# Check if we are using a template
if [ -n $COMMIT_SOURCE ] && [ $COMMIT_SOURCE = 'template' ]; then
if [ "$COMMIT_SOURCE" = 'template' ]; then
# Cannot use templates, warn the user and fail.
echo "Setting a template through -t or commit.template in this project ";
echo "has been disabled. Please run a simple commit.\n";
exit 1;
fi

# Check if a message was given
if [ -n $COMMIT_SOURCE ] && [ $COMMIT_SOURCE = 'message' ]; then
if [ "$COMMIT_SOURCE" = 'message' ]; then
# Cannot use message, warn the user and fail.
echo "Setting a message through -m or -F option in this project ";
echo "has been disabled. Please run a simple commit.\n";
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
## <small>0.5.6 (2023-12-28)</small>
## 0.6.0 (2023-12-28)




## <small>0.5.6 (2023-12-28)</small>

## <small>0.5.5 (2023-12-28)</small>

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gobstones/gobstones-scripts",
"version": "0.5.6",
"version": "0.6.0",
"description": "Scripts to abstract away build configuration of Gobstones Project's libraries and modules.",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion project-types/cli-library/package-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"commander": "^11.1.0"
},
"devDependencies": {
"@gobstones/gobstones-scripts": "^0.5.6",
"@gobstones/gobstones-scripts": "^0.6.0",
"husky": "^8.0.2"
}
}
10 changes: 5 additions & 5 deletions project-types/common/husky/prepare-commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,33 @@ echo "**************************";
echo "";

# Check if we are doing an amend
if [ -n $COMMIT_SOURCE ] && [ $COMMIT_SOURCE = 'commit' ] && [ -n $SHA1 ]; then
if [ "$COMMIT_SOURCE" = 'commit' ] && [ -n $SHA1 ]; then
# Amends do not call the "cz" command.
exit 0;
fi

# Check if we are doing an squash
if [ -n $COMMIT_SOURCE ] && [ $COMMIT_SOURCE = 'squash' ]; then
if [ "$COMMIT_SOURCE" = 'squash' ]; then
# Squashes should not trigger the cz command.
exit 0;
fi

# Check if we are doing an merge
if [ -n $COMMIT_SOURCE ] && [ $COMMIT_SOURCE = 'merge' ]; then
if [ "$COMMIT_SOURCE" = 'merge' ]; then
# Merging should not trigger the cz command.
exit 0;
fi

# Check if we are using a template
if [ -n $COMMIT_SOURCE ] && [ $COMMIT_SOURCE = 'template' ]; then
if [ "$COMMIT_SOURCE" = 'template' ]; then
# Cannot use templates, warn the user and fail.
echo "Setting a template through -t or commit.template in this project ";
echo "has been disabled. Please run a simple commit.\n";
exit 1;
fi

# Check if a message was given
if [ -n $COMMIT_SOURCE ] && [ $COMMIT_SOURCE = 'message' ]; then
if [ "$COMMIT_SOURCE" = 'message' ]; then
# Cannot use message, warn the user and fail.
echo "Setting a message through -m or -F option in this project ";
echo "has been disabled. Please run a simple commit.\n";
Expand Down
2 changes: 1 addition & 1 deletion project-types/library/package-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@gobstones/gobstones-core": "^0.4.7"
},
"devDependencies": {
"@gobstones/gobstones-scripts": "^0.5.6",
"@gobstones/gobstones-scripts": "^0.6.0",
"husky": "^8.0.2"
}
}
2 changes: 1 addition & 1 deletion project-types/react-library/package-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@gobstones/gobstones-scripts": "^0.5.6",
"@gobstones/gobstones-scripts": "^0.6.0",
"husky": "^8.0.2"
}
}
2 changes: 1 addition & 1 deletion project-types/web-library/package-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
},
"devDependencies": {
"@jest/globals": "^29.3.1",
"@gobstones/gobstones-scripts": "^0.5.6",
"@gobstones/gobstones-scripts": "^0.6.0",
"husky": "^8.0.2"
}
}
2 changes: 1 addition & 1 deletion src/config/tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* @group Internal API Objects
*/
export const version = '0.5.6';
export const version = '0.6.0';

/**
* The current directory, as detected by node.
Expand Down

0 comments on commit ee3c04e

Please sign in to comment.