This is Heusala Group's git module manager.
In reality, it is just a smarter command line interface to use Git's SubModules.
Note! It's still quite experimental and in active development.
npm i -g @heusalagroup/hgm
Install fi.hg.core as a git submodule to ./src/fi/hg/core
hgm update fi.hg.core
This is essentially same as following raw commands:
mkdir -p src/fi/hg
git submodule add git@github.com:heusalagroup/fi.hg.core.git src/fi/hg/core
git config -f .gitmodules submodule.src/fi/hg/core.branch main
(cd src/fi/hg/core && git pull --recurse-submodules && git submodule update --init)
...except it can detect current state and only execute steps which are needed.
hgm update
This is essentially same as following raw commands:
git pull --recurse-submodules
git submodule update --init --recursive
Our package system is user extendable.
You can configure your own namespaces by registering the domain and using our HTTP metadata service to configure your Github organization name.
When you own the domain example.com
, it gives you access to define packages under com.example
.
You just need to:
- Register or already own the domain name
- Configure the Github organization name by creating an JSON web resource at a URL
https://example.com/.well-known/fi.hg.m.json
with the content as:
{
"fi.hg.github.org": "example"
}
The implementation uses the .well-known HTTP interface.
Using the nginx
web server you can configure it with the following configuration:
location /.well-known/fi.hg.m.json {
default_type application/json;
return 200 '{"fi.hg.github.org": "example"}';
}
Github pages do not by default include .well-known
folder.
Append to your _config.yml
an include
configuration:
include: [".well-known"]
...and add a JSON file at ./.well-known/fi.hg.m.json
with content:
{
"fi.hg.github.org": "example"
}
Let Nginx serve the JSON directly:
location /.well-known/fi.hg.m.json {
default_type application/json;
return 200 '{"fi.hg.github.org": "heusalagroup"}';
}
Copyright (c) Heusala Group. All rights reserved. Licensed under the MIT License (the "License");