File tree Expand file tree Collapse file tree 3 files changed +15
-10
lines changed Expand file tree Collapse file tree 3 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,10 @@ export default async function deploy(
22
22
const configuration = options . configuration ? options . configuration : 'production'
23
23
const overrides = {
24
24
// this is an example how to override the workspace set of options
25
- ...( options . baseHref && { baseHref : options . baseHref } )
25
+ ...( options . baseHref && { baseHref : options . baseHref } )
26
26
} ;
27
27
28
- context . logger . info ( `📦 Building "${ context . target . project } ". Configuration: "${ configuration } ".${ options . baseHref ? ' Your base-href: "' + options . baseHref + '"' : '' } ` ) ;
28
+ context . logger . info ( `📦 Building "${ context . target . project } ". Configuration: "${ configuration } ".${ options . baseHref ? ' Your base-href: "' + options . baseHref + '"' : '' } ` ) ;
29
29
30
30
const build = await context . scheduleTarget ( {
31
31
target : 'build' ,
Original file line number Diff line number Diff line change @@ -2,21 +2,26 @@ import { logging } from '@angular-devkit/core';
2
2
import * as fse from 'fs-extra' ;
3
3
4
4
import { Schema } from '../deploy/schema' ;
5
+ const Heroku = require ( 'heroku-client' ) ;
5
6
6
7
// TODO: add your deployment code here!
7
8
export async function run ( dir : string , options : Schema , logger : logging . LoggerApi ) {
8
9
9
10
try {
10
11
11
- options . targetDir = options . targetDir || '/example-folder' ;
12
+ const heroku = new Heroku ( { token : '' } ) ;
12
13
13
- if ( ! await fse . pathExists ( options . targetDir ) ) {
14
- throw new Error ( `Target directory ${ options . targetDir } does not exist!` ) ;
15
- }
14
+ const result = await heroku . get ( '/apps' ) ;
15
+ const site = result . find ( ( app => app . name === 'ngx-deploy-demo' ) )
16
16
17
- await fse . copy ( dir , options . targetDir )
18
-
19
- logger . info ( '🚀 Successfully published via @angular-schule/ngx-deploy-starter! Have a nice day!' ) ;
17
+ const slugResult = await heroku . post ( `/apps/${ site . name } /slugs` , {
18
+ body : {
19
+ process_types : { "web" : "node-v0.10.20-linux-x64/bin/node index.js" }
20
+ }
21
+ }
22
+ ) ;
23
+ // console.log(site);
24
+ console . log ( slugResult . blob . url ) ;
20
25
}
21
26
catch ( error ) {
22
27
logger . error ( '❌ An error occurred!' ) ;
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ export const ngAdd = (options: NgAddOptions) => (
75
75
}
76
76
77
77
project . architect [ 'deploy' ] = {
78
- builder : '@angular-schule/ ngx-deploy-starter :deploy' ,
78
+ builder : 'ngx-heroku-deploy :deploy' ,
79
79
options : { }
80
80
} ;
81
81
You can’t perform that action at this time.
0 commit comments