{"id":24478785,"url":"https://github.com/teejay69/version","last_synced_at":"2025-07-07T16:37:01.588Z","repository":{"id":269219065,"uuid":"787139124","full_name":"TeeJay69/Version","owner":"TeeJay69","description":"Software Release Builder","archived":false,"fork":false,"pushed_at":"2024-12-22T12:51:06.000Z","size":2649,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-21T10:13:30.870Z","etag":null,"topics":["backup","building","building-automation","compiling","cpp","release-automation"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TeeJay69.png","metadata":{"files":{"readme":"ReadME.md","changelog":"changelog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-16T00:45:47.000Z","updated_at":"2024-12-22T12:51:09.000Z","dependencies_parsed_at":"2024-12-21T21:24:23.832Z","dependency_job_id":"461e9618-4da6-4443-bb3a-6d5159181eed","html_url":"https://github.com/TeeJay69/Version","commit_stats":null,"previous_names":["teejay69/version"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeeJay69%2FVersion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeeJay69%2FVersion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeeJay69%2FVersion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeeJay69%2FVersion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TeeJay69","download_url":"https://codeload.github.com/TeeJay69/Version/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243615585,"owners_count":20319729,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","building","building-automation","compiling","cpp","release-automation"],"created_at":"2025-01-21T10:13:34.768Z","updated_at":"2025-03-14T16:49:06.043Z","avatar_url":"https://github.com/TeeJay69.png","language":"C++","readme":"# Version\n\n**A simple yet powerful C++ command-line tool for compiling, running, and releasing your projects.**  \nOriginally called **versiontool**, this project has evolved into a robust utility that I regularly use to manage my builds and project releases.\n\n\u003cbr/\u003e\n\n## Table of Contents\n1. [Features](#features)  \n2. [Requirements](#requirements)  \n3. [Installation](#installation)  \n4. [Usage](#usage)  \n    - [General Help](#general-help)\n    - [Compile](#compile)\n    - [Run](#run)\n    - [Release](#release)\n    - [Config](#config)\n5. [Configuration (.versiontool)](#configuration-versiontool)\n6. [Contributing](#contributing)\n7. [License](#license)\n\n\u003cbr/\u003e\n\n## Features\n\n- **Compile and Run**: Easily compile your source code and execute it with optional arguments.  \n- **Release Management**: Create a new version release folder along with an optional installer package if an Inno Setup (ISS.iss) file is present.  \n- **Configuration File**: Store file paths, compile commands, aliases, and more in a dedicated `.versiontool` file.  \n- **Smart Execution**: Automatically detect output file names from common compiler flags (like `-o` or `/out:`).  \n- **Alias Support**: Generate `.bat` alias scripts, making it simpler to call your executable with arguments.  \n- **Colorful Console Output** (Windows): Uses Windows API to enable virtual terminal colors.  \n\n\u003cbr/\u003e\n\n## Requirements\n\n- **Operating System**: Primarily tested on Windows (uses Windows-specific headers and commands).  \n- **Compiler**: A C++17 (or later) compiler.  \n- **Inno Setup** (optional): Only required if you want to build an installer via `release` and you have an `ISS.iss` file.  \n- **CMake or Visual Studio project** (optional): This tool is compiled in any environment supporting standard C++17 or later.  \n\n\u003e **Note**: The application depends on Windows console commands (like `cmd /c`, `taskkill`, etc.) and certain Windows APIs (like `GetModuleFileNameW`). It may require additional modifications to work on other platforms.\n\n\u003cbr/\u003e\n\n## Installation\n\n1. **Clone this Repository**  \n   ```bash\n   git clone https://github.com/your-username/version.git\n   cd version\n   ```\n\n2. **Build the Executable**  \n   - Using a **Visual Studio** project: Import the files into your project and build in Release mode.  \n   - Using **CMake** (example):  \n     ```bash\n     mkdir build \u0026\u0026 cd build\n     cmake ..\n     cmake --build . --config Release\n     ```\n   - Or simply compile from the command line (Windows example):  \n     ```bash\n     cl /std:c++17 /EHsc main.cpp /Fe:version.exe\n     ```\n\n3. **Place the Executable in Your PATH** (optional)  \n   - Copy the generated `version.exe` to a folder that’s in your system `PATH`, or  \n   - Update your `PATH` environment variable to include the folder where `version.exe` is located.\n\n\u003cbr/\u003e\n\n## Usage\n\nBelow are the essential commands and options. After building, use `version [command] [options]`.\n\n### General Help\n```bash\nversion --help\n```\nDisplays usage instructions, available commands, and options.\n\n### Compile\n```bash\nversion compile [--run/-r] [--args/-a \"command args\"] [COMMAND]\n```\n- **`version compile`** uses the compile command specified in **`.versiontool`** by default.\n- **`--run` / `-r`** immediately runs the compiled program.\n- **`--args` / `-a`** passes arguments to the program when running.\n- **`COMMAND`** if provided, overrides the default compile command in `.versiontool`.\n\n### Run\n```bash\nversion run [PATH_TO_EXE] [ARGS]\n```\n- Runs an executable.  \n- If no path is specified, it attempts to run the output from the compile command defined in **`.versiontool`**.  \n\n### Release\n```bash\nversion release [VERSION_NAME]\n```\n- Creates a new version directory under `Versions/`.\n- Compiles the project, copies the compiled binaries and any files/directories listed in **`.versiontool`** to the newly created version folder.\n- If an `ISS.iss` file is present, it updates the version in that file, attempts to build an installer, and copies the resulting `-Setup.exe` to the new version folder.\n\n### Config\n```bash\nversion config\n```\n- Displays the contents of your `.versiontool` config file.\n\n```bash\nversion config --raw\n```\n- Opens **`.versiontool`** in your default text editor (attempts VS Code, Vim, and Notepad, in that order).\n\n\u003cbr/\u003e\n\n## Configuration (.versiontool)\n\nThis tool relies on a config file named **`.versiontool`** in the same directory as the executable or in your project’s root folder. It typically contains sections:\n\n1. **Files and directories included in version:**  \n   List every file or directory to copy to the release folder.  \n   ```\n   Files and directories included in version:\n   [file or folder path 1]\n   [file or folder path 2]\n   ----------\n   ```\n2. **Compile command:**  \n   A single line specifying how to compile your project.  \n   ```\n   Compile command:\n   cl /std:c++17 /EHsc main.cpp /Fe:MyProgram.exe\n   ----------\n   ```\n3. **Alias:**  \n   Each alias line creates a corresponding `.bat` file in the release folder pointing to your compiled exe.  \n   ```\n   Alias:\n   myprogram\n   another_alias\n   ----------\n   ```\n\n\u003e **Note**: If `.versiontool` does not exist, the tool will prompt you to create one.\n\n\u003cbr/\u003e\n\n## Contributing\n\nContributions, bug reports, and feature requests are welcome!  \n1. **Fork** the repository  \n2. **Create** a new branch for your feature/fix  \n3. **Commit** your changes and submit a **Pull Request**  \n\nIf you find a bug or have a suggestion, feel free to open an issue with details and steps to reproduce.\n\n\u003cbr/\u003e\n\n## License\n\nsee [License](Copyright-Disclaimer.md)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteejay69%2Fversion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteejay69%2Fversion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteejay69%2Fversion/lists"}