Release version 1.0.2

This commit is contained in:
Dilantha Nanayakkara 2024-12-07 10:54:59 +11:00
parent ee53a3cb77
commit 7d38c802e2
6 changed files with 39 additions and 22 deletions

View file

@ -1,4 +1,4 @@
.PHONY: install build test clean release-major release-minor release-patch
.PHONY: install build test clean bump-major bump-minor bump-patch release
# Default target
all: install build test
@ -19,16 +19,20 @@ test:
clean:
rm -rf main.js main.js.map
# Release targets
release-major: clean install build test
# Version bump targets
bump-major: clean install build test
./bump-version.sh major
release-minor: clean install build test
bump-minor: clean install build test
./bump-version.sh minor
release-patch: clean install build test
bump-patch: clean install build test
./bump-version.sh patch
# Release target
release:
./release.sh
# Development mode
dev:
pnpm run dev
@ -41,8 +45,9 @@ help:
@echo " make test - Run tests"
@echo " make clean - Clean build artifacts"
@echo " make dev - Run in development mode"
@echo " make release-major - Release major version"
@echo " make release-minor - Release minor version"
@echo " make release-patch - Release patch version"
@echo " make bump-major - Bump major version"
@echo " make bump-minor - Bump minor version"
@echo " make bump-patch - Bump patch version"
@echo " make release - Release the current version"
@echo " make all - Install, build, and test"
@echo " make help - Show this help message"

View file

@ -29,10 +29,11 @@ This plugin uses a Makefile to streamline development tasks. Here are the availa
- `make clean` - Clean build artifacts
- `make all` - Run install, build, and test in sequence
For releases:
- `make release-major` - Release a major version
- `make release-minor` - Release a minor version
- `make release-patch` - Release a patch version
For version management and releases:
- `make bump-major` - Bump major version number
- `make bump-minor` - Bump minor version number
- `make bump-patch` - Bump patch version number
- `make release` - Release the current version (create git tag and push)
> [Link to plugin](https://github.com/dilantha/obsidian-link-formatter)
> [Buy me a coffee](https://buymeacoffee.com/dilantha)

View file

@ -50,11 +50,4 @@ sed -i '' "s/\"version\": \"$current_version\"/\"version\": \"$new_version\"/" p
# Update manifest.json
sed -i '' "s/\"version\": \"$current_version\"/\"version\": \"$new_version\"/" manifest.json
# Git operations
git add package.json manifest.json
git commit -m "chore: bump version to $new_version"
git tag "v$new_version"
git push origin main
git push origin "v$new_version"
echo "Successfully bumped version to $new_version and pushed changes"
echo "$new_version"

View file

@ -1,7 +1,7 @@
{
"id": "link-formatter",
"name": "Link Formatter",
"version": "1.0.1",
"version": "1.0.2",
"minAppVersion": "0.15.0",
"description": "Formats a block of links into a clean markdown list",
"author": "Dilantha Nanayakkara",

View file

@ -1,6 +1,6 @@
{
"name": "link-formatter",
"version": "1.0.1",
"version": "1.0.2",
"description": "",
"main": "main.js",
"scripts": {

18
release.sh Executable file
View file

@ -0,0 +1,18 @@
#!/bin/bash
# Get version from manifest.json
version=$(grep '"version":' manifest.json | cut -d'"' -f4)
if [ -z "$version" ]; then
echo "Error: Could not get version from manifest.json"
exit 1
fi
# Git operations
git add .
git commit -m "Release version $version"
git tag "v$version"
git push origin main
git push origin "v$version"
echo "Successfully released version $version and pushed changes"