Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
14bf9f3e56 |
@@ -7,7 +7,7 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
tag:
|
tag:
|
||||||
description: 'Tag to release (e.g. v0.1.0). The tag must already exist.'
|
description: 'Tag to release (e.g. v0.1.0).'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ jobs:
|
|||||||
id: ref
|
id: ref
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
||||||
echo "ref=${{ inputs.tag }}" >> "$GITHUB_OUTPUT"
|
echo "ref=${{ github.ref }}" >> "$GITHUB_OUTPUT"
|
||||||
echo "tag=${{ inputs.tag }}" >> "$GITHUB_OUTPUT"
|
echo "tag=${{ inputs.tag }}" >> "$GITHUB_OUTPUT"
|
||||||
else
|
else
|
||||||
echo "ref=${{ github.ref }}" >> "$GITHUB_OUTPUT"
|
echo "ref=${{ github.ref }}" >> "$GITHUB_OUTPUT"
|
||||||
@@ -56,6 +56,7 @@ jobs:
|
|||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
tag_name: ${{ steps.ref.outputs.tag }}
|
tag_name: ${{ steps.ref.outputs.tag }}
|
||||||
name: ${{ steps.ref.outputs.tag }}
|
name: ${{ steps.ref.outputs.tag }}
|
||||||
|
target_commitish: ${{ github.sha }}
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
fail_on_unmatched_files: true
|
fail_on_unmatched_files: true
|
||||||
files: |
|
files: |
|
||||||
|
|||||||
@@ -8,20 +8,19 @@ Linux).
|
|||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
Download the pre-built binary for your platform and make it executable.
|
Download the native binary for your platform from a release, or build from
|
||||||
|
source:
|
||||||
Using **curl**:
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -Lo bootstrap_environment "https://github.com/JMR-dev/bootstrap_dev_env/releases/latest/download/bootstrap_environment-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/; s/arm64/arm64/')"
|
git clone https://github.com/JMR-dev/bootstrap_dev_env.git
|
||||||
chmod +x bootstrap_environment
|
cd bootstrap_dev_env
|
||||||
|
make build # builds ./bootstrap_environment for the host
|
||||||
```
|
```
|
||||||
|
|
||||||
Using **wget**:
|
To produce native binaries for all four supported targets at once:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
wget -O bootstrap_environment "https://github.com/JMR-dev/bootstrap_dev_env/releases/latest/download/bootstrap_environment-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/; s/arm64/arm64/')"
|
make build-all # writes dist/bootstrap_environment-{linux,darwin}-{amd64,arm64}
|
||||||
chmod +x bootstrap_environment
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@@ -43,23 +42,3 @@ Flags:
|
|||||||
that backs the `firecracker()` zsh wrapper.
|
that backs the `firecracker()` zsh wrapper.
|
||||||
|
|
||||||
Package lists live in `packages.go`. Edit and rebuild.
|
Package lists live in `packages.go`. Edit and rebuild.
|
||||||
|
|
||||||
## Build from Source
|
|
||||||
|
|
||||||
If you prefer to build the tool yourself, or if you are making custom modifications:
|
|
||||||
|
|
||||||
1. Clone the repository:
|
|
||||||
```shell
|
|
||||||
git clone https://github.com/JMR-dev/bootstrap_dev_env.git
|
|
||||||
cd bootstrap_dev_env
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Build for the current host platform:
|
|
||||||
```shell
|
|
||||||
make build # builds ./bootstrap_environment for the host
|
|
||||||
```
|
|
||||||
|
|
||||||
To cross-compile binaries for all supported targets at once:
|
|
||||||
```shell
|
|
||||||
make build-all # writes dist/bootstrap_environment-{linux,darwin}-{amd64,arm64}
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
# Future State
|
|
||||||
|
|
||||||
- which guard/check at end of binary
|
|
||||||
- unit test suite
|
|
||||||
- early program end if nothing found to do
|
|
||||||
@@ -199,11 +199,6 @@ func resolveSystemPkgs(names []string) ([]string, []string) {
|
|||||||
|
|
||||||
// isSystemPkgInstalled queries the host package manager.
|
// isSystemPkgInstalled queries the host package manager.
|
||||||
func isSystemPkgInstalled(pkg string) bool {
|
func isSystemPkgInstalled(pkg string) bool {
|
||||||
// If 'which $pkg' returns a value, the package's command is available, so skip it.
|
|
||||||
if r, ok := probe([]string{"which", pkg}, 0); ok && r.ExitCode == 0 {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
switch pkgMgr {
|
switch pkgMgr {
|
||||||
case "dnf":
|
case "dnf":
|
||||||
r, ok := probe([]string{"rpm", "-q", pkg}, 0)
|
r, ok := probe([]string{"rpm", "-q", pkg}, 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user