Skip to content

Commit 0bef63c

Browse files
authored
adding more info on forking and testing (#65)
1 parent 6820e61 commit 0bef63c

File tree

2 files changed

+51
-8
lines changed

2 files changed

+51
-8
lines changed

CONTRIBUTING.md

+21-7
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,39 @@ The core team will test the change to validate it before merging it.
2323

2424
## Repository Structure
2525

26-
Scripts are named with dev_[MAJOR_AREA]_[MINORAREA].
27-
The Minor Area is optional. Currently the scripts are completely self contained - there is no script chaining. It would be useful to move to a tree model, and we'll update these instructions if/when that happens.
26+
Recipe scripts are named with **dev_[MAJOR_AREA]_[MINORAREA]**.
27+
The Minor Area is optional.
2828

2929
Examples
3030
- dev_web_nodejs
3131
- dev_app_android
3232
- dev_ml
3333

34-
Current Major Areas
34+
Examples of Major Areas
3535
- web
3636
- app
3737
- ml (machine learning)
3838
- iot
39-
- backend
4039

41-
Minor Area is open
40+
The recipe scripts are intended to be short. Most of script logic should live in helper scripts which live in the **scripts** folder. You can add to existing helper scripts or make new helper scripts.
41+
42+
If you make a new recipe script that includes additional manual steps please create a new folder which includes your new script and a Readme with these instructions.
43+
44+
## Testing a script change
45+
Testing script changes is best done on a clean machine. One way to do this without modifying your primary environment is via a Virtual Machine.
46+
47+
Here's an example of how to set up a test workflow
48+
1. [Install Hyper-V Manager](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v)
49+
1. Create a new VM using [Quick Create](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/quick-create-virtual-machine)
50+
1. Save a [checkpoint](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/checkpoints) as your 'clean' restore point
51+
52+
When you've made script changes to your fork you can run the updated script in this clean VM. In this VM open a browser window and paste the 1-click link which will run your modified recipe script.
53+
54+
`http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/GITHUB_DOMAIN/windows-dev-box-setup-scripts/YOUR_BRANCH/dev_web_nodejs.ps
55+
`
56+
57+
When you've finished testing, in Hyper-V Manager reset this VM to the clean checkpoint so it's ready the next time you test a script.
4258

43-
If you have a change request for Major Area please let us know by filing an issue.
4459

45-
If the script has additional steps please create a folder for your script and include a Readme with these instructions.
4660

4761
Thank you!

README.md

+30-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,36 @@ These scripts leverage two popular open source projects.
99
Boxstarter is a wrapper for Chocolatey and includes features like managing reboots for you. We're using the Boxstarter web launcher to start the installation process:<br/>
1010
https://boxstarter.org/Learn/WebLauncher
1111

12+
## Project structure
13+
The script code is organized in a hierarchy
14+
15+
**Recipes**
16+
A recipe is the script you run. It calls multiple helper scripts. These currently live in the root of the project (dev_app.ps1, dev_webnodejs.ps1, etc.)
17+
18+
**Helper Scripts**: A helper script performs setup routines that may be useful by many recipes. Recipes call helper scripts (you don't run helper scripts directly). The helper scripts live in the **scripts** folder
19+
20+
21+
## You may want to customize the scripts
22+
These scripts should cover a lot of what you need but will not likely match your personal preferences exactly. In this case please fork the project and change the scripts however you desire. We really appreciate PR's back to this project if you have recommended changes.
23+
24+
*Note: When you fork make sure to update these variables in your recipe*
25+
26+
`
27+
$user = "Microsoft";
28+
$baseBranch = "master";
29+
`
30+
31+
*You will also need to update the single click URL for your modified script to refer to your fork:*
32+
33+
`http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/GITHUB_DOMAIN/windows-dev-box-setup-scripts/YOUR_BRANCH/dev_web_nodejs.ps
34+
`
35+
36+
For more info on testing your changes take a look at the [contribution guidelines](CONTRIBUTING.md).
37+
1238
## How to run the scripts
1339
Before you begin, please read the [Legal](#Legal) section.
1440

15-
To run a setup script, click a link in the table below from your target machine. This will download Boxstarter, and prompt you for Boxstarter to run with Administrator privileges (which it needs to do its job). Clicking yes in this dialog will cause the script to begin. You can then leave the job unattended and come back when it's finished.
41+
To run a recipe script, click a link in the table below from your target machine. This will download the Boxstarter one-click application, and prompt you for Boxstarter to run with Administrator privileges (which it needs to do its job). Clicking yes in this dialog will cause the recipe to begin. You can then leave the job unattended and come back when it's finished.
1642

1743
|Click link to run |Description |
1844
|---------|---------|
@@ -33,6 +59,9 @@ To run a setup script, click a link in the table below from your target machine.
3359
## Working with Chocolatey in an organization?
3460
As an organization, you may not be keen to reach out to the internet. That's fine as with just a few modifications you can still take advantage of these scripts. Visit the [organizational use page](ORGANIZATION.md) to learn how.
3561

62+
## Working in education?
63+
In a classroom setting it's a great idea to give your students a recipe script so they can all get setup quickly and reliably. You can modify your recipe script to include downloading course materials and sample projects. To do this, start by forking this project and follow the instructions [here](#you-may-want-to-customize-the-scripts).
64+
3665
## Don't have administrative access?
3766
Are you in an environment where you don't have any administrative access on your machine? No problem, you can still take advantage of Chocolatey and manage "portable" software. You can also use a VM where you may have administrative access (see next section).
3867

0 commit comments

Comments
 (0)