Skip to content

Commit

Permalink
compiled installRequirements using go compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
fchastanet committed Aug 26, 2024
1 parent 722a7e2 commit d93bf99
Show file tree
Hide file tree
Showing 10 changed files with 1,207 additions and 1,098 deletions.
2 changes: 2 additions & 0 deletions .bash-compiler
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FRAMEWORK_ROOT_DIR=${FRAMEWORK_ROOT_DIR:-vendor/bash-tools-framework}
BASH_TOOLS_ROOT_DIR=${BASH_TOOLS_ROOT_DIR:-.}
9 changes: 6 additions & 3 deletions .pre-commit-config-github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,10 @@ repos:
exclude: /testsData/

- repo: https://github.com/fchastanet/bash-tools-framework
rev: 4.0.0
rev: 5.0.0
hooks:
- id: fixShebangExecutionBit
- id: awkLint
- id: buildShFiles
- id: buildShFilesGithubAction
- id: shellcheckLint
- id: shellcheckLintGithubAction
- id: frameworkLint
Expand Down Expand Up @@ -205,3 +203,8 @@ repos:
pass_filenames: false
require_serial: true
stages: [manual] # GITHUB

- repo: https://github.com/fchastanet/bash-compiler
rev: 0.2.9
hooks:
- id: buildBashBinaries
9 changes: 6 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,10 @@ repos:
exclude: /testsData/

- repo: https://github.com/fchastanet/bash-tools-framework
rev: 4.0.0
rev: 5.0.0
hooks:
- id: fixShebangExecutionBit
- id: awkLint
- id: buildShFiles
- id: buildShFilesGithubAction
- id: shellcheckLint
- id: shellcheckLintGithubAction
- id: frameworkLint
Expand Down Expand Up @@ -200,3 +198,8 @@ repos:
pass_filenames: false
require_serial: true
stages: [] # GITHUB

- repo: https://github.com/fchastanet/bash-compiler
rev: 0.2.9
hooks:
- id: buildBashBinaries
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
- [3. Development Environment](#3-development-environment)
- [3.1. build dependencies](#31-build-dependencies)
- [3.2. Precommit hook](#32-precommit-hook)
- [Compile binaries](#compile-binaries)
- [3.3. UT](#33-ut)
- [3.4. auto generated bash doc](#34-auto-generated-bash-doc)
- [3.5. github page](#35-github-page)
Expand Down Expand Up @@ -150,6 +151,14 @@ You also have to execute the following command to enable it:
pre-commit install --hook-type pre-commit --hook-type pre-push
```

### Compile binaries

```bash
export FRAMEWORK_ROOT_DIR=/home/wsl/fchastanet/bash-tools/vendor/bash-tools-framework
export BASH_TOOLS_ROOT_DIR=/home/wsl/fchastanet/bash-tools
go run ./cmd/bash-compiler $(find "${BASH_TOOLS_ROOT_DIR}/src/_binaries" -name 'binary-*.yaml' -print)
```

### 3.3. UT

All the commands are unit tested, you can run the unit tests using the following
Expand Down
Loading

0 comments on commit d93bf99

Please sign in to comment.