Commit Graph

27 Commits

Author SHA1 Message Date
f2102c7b90 client: src: lib_gen: reduce prompt language verbosity 2024-09-23 17:31:11 -07:00
169034cbe2 client: src: lib_gen: refactor/update editor related
- Creates a reusable editor function
- Skipping confirmations will also skip opening up the editor
  * Allows for complete generation without intentional interruption
2024-09-23 17:31:11 -07:00
0ec42d2420 client: rename $global_shell_file -> $global_superscript
Provides clarity, avoids confusion.
2024-09-23 17:31:11 -07:00
51bf587ceb client/container: rename 'subprofile' script to 'subscript'
- Provides clarity, avoids confusion (subprofile.bash -> subscript.bash)

- Changes filename in superscript source
  * End-user must update with client command `edit type=superscript`

- Changes filename in flow subprofile's docker-finance.d
  * Pre-existing subprofiles must manually rename their subscript file
2024-09-23 17:31:11 -07:00
f96dae0210 client: src: lib_gen: impl overhaul for new args
- Rewrite to support new arguments
  * Related design changes and refactoring
  * Remove prompt for testing (use `dev=on` instead)
- Factor out superscript gen from subscript append
- Related print formatting changes
- Add more internal checks
2024-09-23 17:31:11 -07:00
e8509384d2 client: src: lib_gen: add args and args parsing
- Allows for a dynamic `gen` experience
  * All configs/accounts can now be (re)generated on-the-fly
    - Individually, by section, or all at once
  * Adds prompt confirmation option
  * Adds developer profile option
2024-09-23 17:31:11 -07:00
9f6ad19112 client: src: lib_gen: move hledger conf to subprofile gen
Subprofile's hledger conf should be within subprofile generation.
2024-09-22 19:35:22 -07:00
d8222c60fb client: src: refactor environment/gen handler
- Moves environment handling from `lib_gen` to `lib_env`
- Related refactoring
2024-09-22 19:35:22 -07:00
dc4990ab90 client: docker: complete build overhaul, optimize
This commit brings a complete overhaul of the build system:

- Creates a separation of concerns for 'local' and 'remote' building
  * 'local' is built locally via the docker-finance `build` command
  * 'remote' is built *outside* of the docker-finance `build` command
    (pushed to a remote registry and then pulled by the 'local' build)
  * Related refactoring
    - Dockerfiles
    - `lib_gen`

- Adds remote image 'hledger-suite'
  * Provides the latest versions of all `hledger` related binaries
  * No longer relies on package maintainers / out-dated packages

- Adds remote image 'docker-finance'
  * Provides base image for 'finance' and 'dev-tools' images
    - tags 'archlinux' | 'ubuntu' | 'dev-tools'

- Removes previous `hledger` related build modules
  * Removes building any `hledger` related binaries locally

- Removes 'experimental' build
  * End-user can use local custom Dockerfile and/or custom tag instead

- Updates the 'default' | 'slim' | 'tiny' | 'micro' build types
  * Refactors build type requirements into separate build modules
    - Adds 'fetch' module
    - Adds 'track' module
    - Adds 'user' module
      * creates container user *after* base and all other modules
      * allows for quick re-building across multiple local users
    - Updates 'root' module
  * `lib_docker`
    - Updates usage help
    - Adds build modules per build type

- Huge optimizations
  * Vastly improves build times
    - ~60% faster w/ a fresh build
    - ~60%-90% faster rebuild (depending on image type)
  * Vastly improves image sizes
    - e.g., 'default' Arch Linux image size is ~50% smaller
2024-09-17 20:06:33 -07:00
01737d37bf client: lib_gen: new custom plugin layout, update example plugin
- Generates new custom plugin directory layout upon `gen`
  * Allows for drop-in client-side/container-side custom plugins

- Moved container plugin example into container's plugins
  * Plugin is no longer generated upon `gen` (it's available in-repo)

- Updates plugin example
    - Provides requisite lib_finance initialization
    - Refactored, added more checks
    - Expand example case
    - Linter fixes
2024-08-12 18:30:45 -07:00
923a9eee24 client: lib_gen: generate 'times'
- Sets a location for:
  * timew database
  * Anything time-related (among all profiles)
2024-08-09 00:01:48 -07:00
eaec539c22 client: lib_gen: generate plugins
- Sets a location for plugins
  * Allows for end-user custom plugins
- Provides default example plugin
2024-08-08 16:00:03 -07:00
be6e366d80 client: lib_gen: fix missing copy of custom Dockerfile
Existing file was backed up but repo default was not copied over.
2024-08-07 21:33:21 -07:00
b30c00f3b6 client: lib_gen: refactor flow generation
- Checks for/creates established layout
- Refactor subprofile function names
- Clarifies questions/documentation
2024-08-07 21:33:21 -07:00
c49e0ad795 client: lib_gen: fix missing directory slash 2024-07-27 16:26:17 -07:00
cbe5a107ee client: lib_gen: fix custom Dockerfile path
Fixup to #90.
2024-07-19 23:24:13 -07:00
c34fd15a51 client: lib_gen: fix environment reader/resetter
- Fixes default env generation if current env exists
    * was not unsetting all previously exported env
- Adds debug output
2024-07-19 17:52:38 -07:00
af533460ec client: lib_gen: rewrite/fix global env gen
- Fixes resetting of globals after sourcing custom env file (location)
- Reorganizes flow logic
- Related refactoring
- Clarifies comments
- Adds debug output
2024-07-19 16:48:40 -07:00
7118a39f6d client: optimize/refactor repository path
- Reduces all calls into a single line
- Redefines path as root repository path
2024-07-18 22:57:31 -07:00
f0561d1ebe client: lib_gen: superscript: append subprofile before generating
- Append new subprofile before potentially generating new file
- Simplifies backup/writing process
- Related refactoring
2024-07-16 17:54:25 -07:00
bc7ebff2a1 client: lib_docker: factor env gen into lib_gen
- Related environment refactoring
2024-07-13 03:08:59 -07:00
4d3eef6067 client: new internal client versioning system
- Version is now determined on-the-fly from manifest file
- Internal versioning no longer depends on environment file
2024-07-13 03:01:06 -07:00
7f199f1615 client: lib_gen: ignore comments in env file 2024-07-13 00:46:57 -07:00
c2ac298f67 client: lib_gen: add hledger conf support 2024-07-08 18:13:34 -07:00
f43f77d28b client: lib_gen: return success on client generation
Selecting [nN] to client generation would skip optional container generation.
2024-07-03 19:22:59 -07:00
aafe16c0c0 client: lib_gen: generate custom Dockerfile 2024-06-26 14:58:20 -07:00
b621e87df2 docker-finance | modern accounting for the power-user
Dedicated to Michael Morgan: a beautiful, beautiful soul.

---

Internal signing keys:

  Aaron Fiore (sole author)

    - 518A22F85BEFD32BCC99C48603F90C4F35E0213E
    - 31ECA5C347A0CC0815EDE730A3EACCFCDA7E685E
    - C8187C585CB07A4DA81CC0F37318B50EBE9C0DA8

Internal repositories (rebased from):

  Staging:

    $ git log -n1 --pretty=format:"%H"
    c8e0cd66f6c89fa7b3c62f72fb524a4cc454b7b6

    $ git rev-list --max-parents=0 HEAD
    ac3863b8c234755855f1aea3a07a853122decdf2

  Private:

    $ git log -n1 --pretty=format:"%H"
    69bb3591eaa2990a9637832bb484690e00c4f926

    $ git rev-list --max-parents=0 HEAD
    a5c1cc9fb593c4cf09bc0adfef6cb6d2964511ae
2024-03-08 23:42:21 -08:00