chore: realign next on latest [ci skip]

This commit is contained in:
semantic-release 2020-12-18 16:06:05 +00:00
commit 71b346bcc4
5 changed files with 36 additions and 8 deletions

View File

@ -1,3 +1,10 @@
## [1.1.1](https://github.com/getmeli/meli-cli/compare/v1.1.0...v1.1.1) (2020-12-18)
### Bug Fixes
* tar not working for branches with slashes ([3d21eea](https://github.com/getmeli/meli-cli/commit/3d21eea2347cc382b46ddc08de29b19ec6e88231))
# [1.1.0](https://github.com/getmeli/meli-cli/compare/v1.0.0...v1.1.0) (2020-12-09)

21
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@getmeli/cli",
"version": "1.0.0",
"version": "1.1.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -1514,6 +1514,12 @@
"@types/node": "*"
}
},
"@types/uuid": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.0.tgz",
"integrity": "sha512-eQ9qFW/fhfGJF8WKHGEHZEyVWfZxrT+6CLIJGBcZPfxUh/+BnEj+UCGYMlr9qZuX/2AltsvwrGqp0LhEW8D0zQ==",
"dev": true
},
"@types/yargs": {
"version": "15.0.9",
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.9.tgz",
@ -13323,6 +13329,11 @@
}
}
},
"slugify": {
"version": "1.4.6",
"resolved": "https://registry.npmjs.org/slugify/-/slugify-1.4.6.tgz",
"integrity": "sha512-ZdJIgv9gdrYwhXqxsH9pv7nXxjUEyQ6nqhngRxoAAOlmMGA28FDq5O4/5US4G2/Nod7d1ovNcgURQJ7kHq50KQ=="
},
"snapdragon": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
@ -14582,11 +14593,9 @@
"dev": true
},
"uuid": {
"version": "8.3.1",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz",
"integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==",
"dev": true,
"optional": true
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
},
"v8-compile-cache": {
"version": "2.2.0",

View File

@ -1,6 +1,6 @@
{
"name": "@getmeli/cli",
"version": "1.1.0",
"version": "1.1.1",
"description": "Meli CLI",
"main": "build/index.js",
"bin": {
@ -28,8 +28,10 @@
"chalk": "^4.1.0",
"debug": "^4.2.0",
"form-data": "^3.0.0",
"slugify": "^1.4.6",
"source-map-support": "^0.5.19",
"tar": "^6.0.5",
"uuid": "^8.3.2",
"winston": "^3.3.3",
"yargs": "^15.4.1"
},
@ -41,6 +43,7 @@
"@types/jest": "^25.2.3",
"@types/node": "^12.19.4",
"@types/tar": "^4.0.3",
"@types/uuid": "^8.3.0",
"@typescript-eslint/eslint-plugin": "^3.9.0",
"@typescript-eslint/parser": "^3.9.0",
"eslint": "^7.7.0",

View File

@ -0,0 +1,8 @@
import slug from 'slugify';
export function slugify(str: string): string {
return slug(str, {
replacement: '-',
lower: true,
});
}

View File

@ -4,11 +4,12 @@ import { Logger } from '../../commons/logger/logger';
import { UploadOptions } from './upload-options';
import { uploadArchive } from './upload-archive';
import { archiveFiles } from './archive-files';
import { v4 as uuid } from 'uuid';
const logger = new Logger('meli.cli:upload');
export async function upload(options: UploadOptions): Promise<void> {
const archivePath = join(tmpdir(), `${options.site}-${options.release ?? 'latest'}-${options.branch}.tar.gz`);
const archivePath = join(tmpdir(), `site-${uuid()}.tar.gz`);
logger.info(`Compressing files from ${options.directory}....`);
await archiveFiles(options.directory, archivePath);