|
| 1 | +# Installing the "Nightly" build of DSC CLI |
| 2 | + |
| 3 | +> **Note**: Nightly builds contain the latest development features but may have bugs or breaking |
| 4 | +> changes. Only install if you want to test unreleased functionality. If you encounter issues, |
| 5 | +> please [open an issue](https://github.com/PowerShell/DSC/issues/new). |
| 6 | +
|
| 7 | +## Via script |
| 8 | + |
| 9 | +> **Note**: This script requires the [GitHub CLI](https://cli.github.com/) to have already been |
| 10 | +> installed. |
| 11 | +
|
| 12 | +### DSC CLI |
| 13 | + |
| 14 | +This will install the latest nightly DSC CLI binary: |
| 15 | + |
| 16 | +- **Windows**: `%LOCALAPPDATA%\dsc\dsc.exe` |
| 17 | +- **Linux/macOS**: `~/.dsc/bin/dsc` |
| 18 | + |
| 19 | +1. (macOS/Linux) Run the following: |
| 20 | + |
| 21 | + ```sh |
| 22 | + bash <(curl -Ls https://raw.githubusercontent.com/PowerShell/DSC/refs/heads/main/sharedScripts/install_cli_nightly.sh) |
| 23 | + ``` |
| 24 | + |
| 25 | +1. (Windows) Run the following in a PowerShell window: |
| 26 | + |
| 27 | + ```powershell |
| 28 | + iex "& { $(irm https://raw.githubusercontent.com/PowerShell/DSC/refs/heads/main/sharedScripts/install_cli_nightly.ps1) }" |
| 29 | + ``` |
| 30 | + |
| 31 | +1. Add the installation directory to your PATH environment variable to use `dsc` from any location. |
| 32 | + |
| 33 | +## Manual |
| 34 | + |
| 35 | +We are not currently publishing "nightly" releases, but you can grab the latest bits by viewing |
| 36 | +the latest Action workflows for the `main` branch (or any other branch). |
| 37 | + |
| 38 | +The easiest way to get these artifacts is through the GitHub site. Follow |
| 39 | +[this link](https://github.com/PowerShell/DSC/actions/workflows/rust.yml?query=branch%3Amain+is%3Asuccess) |
| 40 | +to view the latest successful Action workflows for the `main` branch. Select it to show the related |
| 41 | +artifacts. |
| 42 | + |
| 43 | +On the details page, select the artifact for your platform: |
| 44 | + |
| 45 | +- `windows-bin` for Windows |
| 46 | +- `linux-bin` for Linux |
| 47 | +- `macos-bin` for macOS |
| 48 | + |
| 49 | +Extract the archive and place the `dsc` executable (or `dsc.exe` on Windows) in a directory in |
| 50 | +your PATH. |
| 51 | + |
| 52 | +## Advanced Script Options |
| 53 | + |
| 54 | +### DSC CLI |
| 55 | + |
| 56 | +- macOS/Linux |
| 57 | + |
| 58 | + ```sh |
| 59 | + # install to a custom directory |
| 60 | + bash <(curl -Ls https://raw.githubusercontent.com/PowerShell/DSC/refs/heads/main/sharedScripts/install_cli_nightly.sh) --install-path /usr/local/bin |
| 61 | + |
| 62 | + # install from a fork repo |
| 63 | + bash <(curl -Ls https://raw.githubusercontent.com/PowerShell/DSC/refs/heads/main/sharedScripts/install_cli_nightly.sh) --repo myusername/DSC |
| 64 | + |
| 65 | + # install from a custom branch |
| 66 | + bash <(curl -Ls https://raw.githubusercontent.com/PowerShell/DSC/refs/heads/main/sharedScripts/install_cli_nightly.sh) --branch feature-branch |
| 67 | + |
| 68 | + # install from a specific github action run |
| 69 | + bash <(curl -Ls https://raw.githubusercontent.com/PowerShell/DSC/refs/heads/main/sharedScripts/install_cli_nightly.sh) --run-id 6146657618 |
| 70 | + ``` |
| 71 | + |
| 72 | +- Windows |
| 73 | + |
| 74 | + ```powershell |
| 75 | + # install to a custom directory |
| 76 | + iex "& { $(irm https://raw.githubusercontent.com/PowerShell/DSC/refs/heads/main/sharedScripts/install_cli_nightly.ps1) } -InstallPath C:\tools\dsc" |
| 77 | +
|
| 78 | + # install from a fork repo |
| 79 | + iex "& { $(irm https://raw.githubusercontent.com/PowerShell/DSC/refs/heads/main/sharedScripts/install_cli_nightly.ps1) } -Repo myusername/DSC" |
| 80 | +
|
| 81 | + # install from a custom branch |
| 82 | + iex "& { $(irm https://raw.githubusercontent.com/PowerShell/DSC/refs/heads/main/sharedScripts/install_cli_nightly.ps1) } -Branch feature-branch" |
| 83 | +
|
| 84 | + # install from a specific github action run |
| 85 | + iex "& { $(irm https://raw.githubusercontent.com/PowerShell/DSC/refs/heads/main/sharedScripts/install_cli_nightly.ps1) } -RunId 6146657618" |
| 86 | + ``` |
0 commit comments