Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: windows args #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/validate-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,23 @@ jobs:
run: npm ci
- name: Run linter
run: npm run lint

build:
runs-on: ${{ matrix.os }}
needs: validate-code
strategy:
matrix:
os: [windows-latest]
node: [16]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependencies
run: |
npm ci
npm link
kopytko new test-app --rokuIP=foo --rokuDevUser=bar --rokuDevPassword=baz --rokuDevId=qux --rokuDevSigningPassword=quux
rm test-app/node_modules/.bin/kopytko*
npm ls
- name: Run build
run: npm run build --prefix=test-app -- test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.vscode/

node_modules/
example/dist
2 changes: 1 addition & 1 deletion actions/build.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require('path');
const fs = require('fs');

console.log(process.cwd());
const script = path.join(process.cwd(), 'node_modules', '@dazn', 'kopytko-packager', 'scripts', 'build.js');

if (!fs.existsSync(script)) {
Expand Down
12 changes: 11 additions & 1 deletion commands/new.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
const colors = require('ansi-colors');
const schematicAction = require('../actions/schematic');
const rokuDevSigningPassword = require('../options/rokuDevSigningPassword');
const rokuDevPasswordOption = require('../options/rokuDevPassword');
const rokuDevUserOption = require('../options/rokuDevUser');
const skipInstallOption = require('../options/skipInstall');
const rokuDevIdOption = require('../options/rokuDevId');
const schematicAction = require('../actions/schematic');
const rokuIPOption = require('../options/rokuIP');
const dryRunOption = require('../options/dryRun');

function load(program) {
Expand All @@ -10,6 +15,11 @@ function load(program) {
.description('Creates new kopytko application')
.addOption(skipInstallOption)
.addOption(dryRunOption)
.addOption(rokuIPOption)
.addOption(rokuDevIdOption)
.addOption(rokuDevUserOption)
.addOption(rokuDevPasswordOption)
.addOption(rokuDevSigningPassword)
.action(async (name, options) => {
try {
await schematicAction.execute({
Expand Down
9 changes: 9 additions & 0 deletions example/.kopytkorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"sourceDir": "/src",
"baseManifest": "/manifest/default.js",
"environments": {
"test": {
"manifest": "/manifest/test.js"
}
}
}
5 changes: 5 additions & 0 deletions example/manifest/default.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const { baseManifest } = require('@dazn/kopytko-packager');

module.exports = {
...baseManifest,
};
1 change: 1 addition & 0 deletions example/manifest/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
Loading