Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

Commit

Permalink
fix: add baseDir
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Apr 9, 2018
1 parent dd2ee59 commit a1f030c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -9,7 +9,7 @@
"bugs": "https://github.com/oclif/dev-cli/issues",
"dependencies": {
"@oclif/command": "^1.4.10",
"@oclif/config": "^1.4.9",
"@oclif/config": "^1.4.10",
"@oclif/errors": "^1.0.4",
"@oclif/plugin-help": "^1.2.3",
"@oclif/plugin-warn-if-update-available": "^1.3.0",
Expand Down
2 changes: 2 additions & 0 deletions src/tarballs/build.ts
Expand Up @@ -93,6 +93,7 @@ export async function build({
if (target.keys.tarball.xz) await pack(workspace, dist(target.keys.tarball.xz))
target.manifest = {
version,
baseDir: target.keys.baseDir,
channel: config.channel,
gz: target.urls.tarball.gz,
xz: target.urls.tarball.xz,
Expand All @@ -108,6 +109,7 @@ export async function build({
const buildBaseManifest = async () => {
const manifest: IManifest = {
version,
baseDir: vanilla.baseDir,
channel: config.channel,
gz: vanilla.urls.gz,
xz: vanilla.urls.xz,
Expand Down
5 changes: 5 additions & 0 deletions src/tarballs/config.ts
Expand Up @@ -21,6 +21,7 @@ export interface IConfig {
tarball: Tarball
urls: Tarball
manifest: string
baseDir: string
}
targets: ITarget[]
targetWorkspace(platform: string, arch: string): string
Expand All @@ -36,6 +37,7 @@ export interface ITarget {
keys: {
tarball: Tarball
manifest: string
baseDir: string
}
manifest?: ITargetManifest
}
Expand All @@ -49,6 +51,7 @@ export interface ITargetManifest {
xz?: string
sha256gz: string
sha256xz?: string
baseDir: string
}

export interface IManifest extends ITargetManifest {
Expand Down Expand Up @@ -101,6 +104,7 @@ export async function buildConfig(root: string): Promise<IConfig> {
tarball: vanillaTarball,
urls: vanillaUrls,
manifest: _.template(updateConfig.s3.templates.vanillaManifest)(templateOpts),
baseDir: _.template(updateConfig.s3.templates.vanillaBaseDir)(templateOpts),
},
tmp,
updateConfig,
Expand All @@ -121,6 +125,7 @@ export async function buildConfig(root: string): Promise<IConfig> {
const keys: ITarget['keys'] = {
manifest,
tarball: {gz: key + '.tar.gz'},
baseDir: _.template(updateConfig.s3.templates.vanillaBaseDir)(templateOpts),
}
const gzUrl = new URL(s3Host)
gzUrl.pathname = path.join(gzUrl.pathname, keys.tarball.gz)
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Expand Up @@ -73,9 +73,9 @@
dependencies:
debug "^3.1.0"

"@oclif/config@^1.4.9":
version "1.4.9"
resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.4.9.tgz#62712d1e528c082c5fa2de530da108ccbeedd51a"
"@oclif/config@^1.4.10":
version "1.4.10"
resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.4.10.tgz#79d10455378bf97b0910685659c00a7cca6e2e77"
dependencies:
debug "^3.1.0"

Expand Down

0 comments on commit a1f030c

Please sign in to comment.