Skip to content

Commit 07d4ac8

Browse files
committed
CDN: Make fake remote repository location configurable
1 parent c0b5db2 commit 07d4ac8

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ node release.js --remote=jquery/<project-name>
1414

1515
### Testing the Release Script
1616

17-
***This only applies to those with access to some private repos. You can also use any other repo with a release script.***
18-
1917
You can do a test run of the release script by using a different remote repository. **It is recommended to perform tests from a fresh clone of the project being released.** The script is smart enough to detect if you're using an official repository and adjust which actions are taken so that undesired actions, such as publishing to npm, don't occur for test runs.
2018

2119
You can also explicitly specify `--dry-run` to skip actions that affect external state.
@@ -43,13 +41,13 @@ git push -f
4341
cd -
4442

4543
npm run clean
46-
node --dry-run release.js --remote=$project
44+
env TEST_REMOTE=$cdn node --dry-run release.js --remote=$project
4745
```
4846

49-
You need local clones of [fake-project](https://github.com/jquery/fake-project) and [fake-cdn](https://github.com/jquery/fake-cdn) (private, see note above), then update both variables to point to those.
50-
5147
Save as `test-release.sh` in the checkout of this repo, make it executable with `chmod +x test-release.sh`, then run with `./test-release.sh`.
5248

49+
***If you have access to the private repositories [fake-project](https://github.com/jquery/fake-project) and [fake-cdn](https://github.com/jquery/fake-cdn)***, you can use them by dropping the `--dry-run` argument and updating the `TEST_REMOTE` environment variable to "[email protected]:jquery/fake-cdn.git".
50+
5351
### Full Usage Options
5452

5553
See the [usage documentation](/docs/usage.txt) for the full set of options. You can also run the script with no parameters to see the usage.

lib/cdn.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var shell = require( "shelljs" ),
44

55
module.exports = function( Release ) {
66
var realRemote = "[email protected]:jquery/codeorigin.jquery.com.git",
7-
testRemote = "[email protected]:jquery/fake-cdn.git";
7+
testRemote = process.env.TEST_REMOTE || "[email protected]:jquery/fake-cdn.git";
88

99
function projectCdn() {
1010
var project = Release.readPackage().name,

0 commit comments

Comments
 (0)