|
1 | 1 | # [](https://discord.gg/M6aTR9eTwN) |
2 | 2 |
|
3 | | -## @eliware/tagit [](https://www.npmjs.com/package/@eliware/tagit)[](LICENSE)[](https://github.com/eliware/tagit/actions) |
| 3 | +## @eliware/tagit [](https://www.npmjs.com/package/@eliware/tagit) [](LICENSE) [](https://github.com/eliware/tagit/actions) |
4 | 4 |
|
5 | | -A starter template for new Node.js projects. Use this as a foundation for your next application or service. |
| 5 | +Automated version management and Git operations for Node.js and PHP projects. |
| 6 | + |
| 7 | +**Note:** `tagit` is intended for use on Linux systems only. |
6 | 8 |
|
7 | 9 | --- |
8 | 10 |
|
9 | 11 | ## Table of Contents |
10 | 12 |
|
| 13 | +- [What is tagit?](#what-is-tagit) |
11 | 14 | - [Features](#features) |
12 | | -- [Getting Started](#getting-started) |
13 | | -- [Development](#development) |
14 | | -- [Testing](#testing) |
15 | | -- [Customization](#customization) |
| 15 | +- [Usage](#usage) |
16 | 16 | - [Support](#support) |
17 | 17 | - [License](#license) |
| 18 | +- [Links](#links) |
18 | 19 |
|
19 | | -## Features |
20 | | - |
21 | | -- Pre-configured for Node.js (ESM) |
22 | | -- Environment variable support via dotenv |
23 | | -- Logging and signal handling via `@eliware/common` |
24 | | -- Jest for testing |
25 | | -- MIT License |
| 20 | +## What is tagit? |
26 | 21 |
|
27 | | -## Getting Started |
| 22 | +`tagit` is a CLI utility that automates the process of incrementing your project version, updating version files (`package.json` and/or `composer.json`), committing the changes, tagging the commit, and pushing to your Git repository. It provides detailed logging and robust error handling for a smooth release workflow. |
28 | 23 |
|
29 | | -1. **Clone this template:** |
30 | | - |
31 | | - ```bash |
32 | | - git clone https://github.com/eliware/tagit.git |
33 | | - cd tagit |
34 | | - rm -rf .git |
35 | | - git init |
36 | | - npm install |
37 | | - ``` |
| 24 | +## Features |
38 | 25 |
|
39 | | -2. **Update project details:** |
40 | | - - Edit `package.json` (name, description, author, etc.) |
41 | | - - Update this `README.md` as needed |
42 | | - - Change the license if required |
| 26 | +- Increments the semantic version in `package.json` and/or `composer.json` |
| 27 | +- Writes the new version back to the file(s) |
| 28 | +- Commits all changes with a message like: `Version <version> - MM-DD-YYYY` |
| 29 | +- Tags the commit with the new version |
| 30 | +- Pushes commits and tags to your remote repository |
| 31 | +- Logs each step for transparency |
43 | 32 |
|
44 | | -## Development |
| 33 | +## Installation |
45 | 34 |
|
46 | | -- Main entry: `tagit.mjs` |
47 | | -- Start your app: |
| 35 | +Clone the repository (suggested location: `/opt`): |
48 | 36 |
|
49 | | - ```bash |
50 | | - node tagit.mjs |
51 | | - ``` |
| 37 | +```bash |
| 38 | +sudo git clone https://github.com/eliware/tagit.git /opt/tagit |
| 39 | +cd /opt/tagit |
| 40 | +sudo npm install |
| 41 | +# (Optional) Run tests |
| 42 | +sudo npm test |
| 43 | +``` |
52 | 44 |
|
53 | | -- Add your code in new files and import as needed. |
| 45 | +Create a symlink to make `tagit` available system-wide: |
54 | 46 |
|
55 | | -## Testing |
| 47 | +```bash |
| 48 | +sudo ln -s /opt/tagit/tagit.mjs /usr/bin/tagit |
| 49 | +``` |
56 | 50 |
|
57 | | -- Run tests with: |
| 51 | +## Usage |
58 | 52 |
|
59 | | - ```bash |
60 | | - npm test |
61 | | - ``` |
| 53 | +Switch to the root directory of the project you want to bump the version for, then run: |
62 | 54 |
|
63 | | -- Add your tests in the `__tests__` folder or alongside your code. |
| 55 | +```bash |
| 56 | +tagit |
| 57 | +``` |
64 | 58 |
|
65 | | -## Customization |
| 59 | +If you have not created the symlink, you can run it directly with: |
66 | 60 |
|
67 | | -- Replace or extend the logging and signal handling as needed. |
68 | | -- Add dependencies and scripts to fit your project. |
69 | | -- Remove or modify template files and sections. |
| 61 | +```bash |
| 62 | +/opt/tagit/tagit.mjs |
| 63 | +``` |
70 | 64 |
|
71 | 65 | ## Support |
72 | 66 |
|
73 | | -For help, questions, or to chat with the author and community, visit: |
74 | | - |
75 | | -[](https://discord.gg/M6aTR9eTwN)[](https://discord.gg/M6aTR9eTwN) |
| 67 | +For help or questions, join the community and chat with the author: |
76 | 68 |
|
| 69 | +[](https://discord.gg/M6aTR9eTwN) |
77 | 70 | **[eliware.org on Discord](https://discord.gg/M6aTR9eTwN)** |
78 | 71 |
|
79 | 72 | ## License |
|
0 commit comments