Skip to content

Commit

Permalink
♻️ attempt to pull in from a piped file
Browse files Browse the repository at this point in the history
  • Loading branch information
acidjazz committed Nov 26, 2020
1 parent 394252b commit f8512fa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {Auth} from './auth'
import {YamlConfig, Entry, AwsClientConfig, FumeEnvironment, S3Config} from './types'
import execa from 'execa'
import { execSync } from 'child_process'
import * as fs from "fs";

export default class Deployment {
auth: Auth
Expand All @@ -18,10 +19,12 @@ export default class Deployment {
}

async initialize(environment: string) {
execSync('git log --decorate=short -n 1 > git_log_fume_cli.txt')
const data = {
env: environment,
commit: execSync('git log --decorate=short -n 1').toString(),
commit: fs.readFileSync('git_log_fume_cli.txt', 'utf8'),
}
fs.unlinkSync('git_log_fume_cli.txt')
this.entry = (await this.auth.axios.post(`/project/${this.config.id}/dep`, data)).data.data.data
this.s3 = (await this.auth.axios.get(`/project/${this.config.id}/dep/${this.entry.id}/s3`)).data.data
this.s3.path = `${__dirname}/${this.s3.file}`
Expand Down

0 comments on commit f8512fa

Please sign in to comment.