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

fix(install): Update install command to use new release URL format #53

Merged
merged 1 commit into from
Jun 28, 2018
Merged
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
3 changes: 2 additions & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ require('yargs')
await rimrafAsync(tmpDirPath);
await mkdirpAsync(tmpDirPath);

const releaseUrl = `http://github.com/brainly/html-sketchapp/releases/download/v${version}/asketch2sketch.sketchplugin.zip`;
const [ major, minor, patch ] = version.split('.');
const releaseUrl = `http://github.com/brainly/html-sketchapp/releases/download/v${version}/asketch2sketch-${major}-${minor}-${patch}.sketchplugin.zip`;
console.log(`Downloading from ${releaseUrl}`);
const axios = require('axios');
const { data } = await axios(releaseUrl, { responseType: 'arraybuffer' });
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"homepage": "https://github.com/seek-oss/html-sketchapp-cli#readme",
"dependencies": {
"@brainly/html-sketchapp": "^3.0.0",
"@brainly/html-sketchapp": "^3.2.0",
"axios": "^0.18.0",
"decompress": "^4.2.0",
"es6-promisify": "^6.0.0",
Expand Down
20 changes: 20 additions & 0 deletions test/config-file-path/__snapshots__/file.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ Object {
},
"document.page.json": Object {
"_class": "page",
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"exportOptions": Object {
"_class": "exportOptions",
Expand All @@ -111,6 +112,7 @@ Object {
"y": 0,
},
"hasClickThrough": true,
"hasClippingMask": false,
"horizontalRulerData": Object {
"_class": "rulerData",
"base": 0,
Expand All @@ -133,6 +135,7 @@ Object {
"red": 1,
},
"changeIdentifier": 0,
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"exportOptions": Object {
"_class": "exportOptions",
Expand All @@ -151,6 +154,7 @@ Object {
},
"hasBackgroundColor": false,
"hasClickThrough": true,
"hasClippingMask": false,
"horizontalRulerData": Object {
"_class": "rulerData",
"base": 0,
Expand Down Expand Up @@ -195,6 +199,7 @@ Object {
Object {
"_class": "rectangle",
"booleanOperation": -1,
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"edited": false,
"exportOptions": Object {
Expand All @@ -213,6 +218,7 @@ Object {
"x": 0,
"y": 0,
},
"hasClippingMask": false,
"hasConvertedToNewRoundCorners": true,
"isFlippedHorizontal": false,
"isFlippedVertical": false,
Expand Down Expand Up @@ -333,6 +339,7 @@ Object {
Object {
"_class": "text",
"automaticallyDrawOnUnderlyingPath": false,
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"dontSynchroniseWithSymbol": false,
"exportOptions": Object {
Expand All @@ -350,6 +357,7 @@ Object {
"x": 20,
"y": 10,
},
"hasClippingMask": false,
"isFlippedHorizontal": false,
"isFlippedVertical": false,
"isLocked": false,
Expand Down Expand Up @@ -405,6 +413,7 @@ Object {
"red": 1,
},
"changeIdentifier": 0,
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"exportOptions": Object {
"_class": "exportOptions",
Expand All @@ -423,6 +432,7 @@ Object {
},
"hasBackgroundColor": false,
"hasClickThrough": true,
"hasClippingMask": false,
"horizontalRulerData": Object {
"_class": "rulerData",
"base": 0,
Expand Down Expand Up @@ -467,6 +477,7 @@ Object {
Object {
"_class": "rectangle",
"booleanOperation": -1,
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"edited": false,
"exportOptions": Object {
Expand All @@ -485,6 +496,7 @@ Object {
"x": 0,
"y": 0,
},
"hasClippingMask": false,
"hasConvertedToNewRoundCorners": true,
"isFlippedHorizontal": false,
"isFlippedVertical": false,
Expand Down Expand Up @@ -605,6 +617,7 @@ Object {
Object {
"_class": "text",
"automaticallyDrawOnUnderlyingPath": false,
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"dontSynchroniseWithSymbol": false,
"exportOptions": Object {
Expand All @@ -622,6 +635,7 @@ Object {
"x": 20,
"y": 10,
},
"hasClippingMask": false,
"isFlippedHorizontal": false,
"isFlippedVertical": false,
"isLocked": false,
Expand Down Expand Up @@ -677,6 +691,7 @@ Object {
"red": 1,
},
"changeIdentifier": 0,
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"exportOptions": Object {
"_class": "exportOptions",
Expand All @@ -695,6 +710,7 @@ Object {
},
"hasBackgroundColor": false,
"hasClickThrough": true,
"hasClippingMask": false,
"horizontalRulerData": Object {
"_class": "rulerData",
"base": 0,
Expand Down Expand Up @@ -739,6 +755,7 @@ Object {
Object {
"_class": "rectangle",
"booleanOperation": -1,
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"edited": false,
"exportOptions": Object {
Expand All @@ -757,6 +774,7 @@ Object {
"x": 0,
"y": 0,
},
"hasClippingMask": false,
"hasConvertedToNewRoundCorners": true,
"isFlippedHorizontal": false,
"isFlippedVertical": false,
Expand Down Expand Up @@ -877,6 +895,7 @@ Object {
Object {
"_class": "text",
"automaticallyDrawOnUnderlyingPath": false,
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"dontSynchroniseWithSymbol": false,
"exportOptions": Object {
Expand All @@ -894,6 +913,7 @@ Object {
"x": 20,
"y": 10,
},
"hasClippingMask": false,
"isFlippedHorizontal": false,
"isFlippedVertical": false,
"isLocked": false,
Expand Down
20 changes: 20 additions & 0 deletions test/config-file/__snapshots__/file.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ Object {
},
"document.page.json": Object {
"_class": "page",
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"exportOptions": Object {
"_class": "exportOptions",
Expand All @@ -111,6 +112,7 @@ Object {
"y": 0,
},
"hasClickThrough": true,
"hasClippingMask": false,
"horizontalRulerData": Object {
"_class": "rulerData",
"base": 0,
Expand All @@ -133,6 +135,7 @@ Object {
"red": 1,
},
"changeIdentifier": 0,
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"exportOptions": Object {
"_class": "exportOptions",
Expand All @@ -151,6 +154,7 @@ Object {
},
"hasBackgroundColor": false,
"hasClickThrough": true,
"hasClippingMask": false,
"horizontalRulerData": Object {
"_class": "rulerData",
"base": 0,
Expand Down Expand Up @@ -195,6 +199,7 @@ Object {
Object {
"_class": "rectangle",
"booleanOperation": -1,
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"edited": false,
"exportOptions": Object {
Expand All @@ -213,6 +218,7 @@ Object {
"x": 0,
"y": 0,
},
"hasClippingMask": false,
"hasConvertedToNewRoundCorners": true,
"isFlippedHorizontal": false,
"isFlippedVertical": false,
Expand Down Expand Up @@ -333,6 +339,7 @@ Object {
Object {
"_class": "text",
"automaticallyDrawOnUnderlyingPath": false,
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"dontSynchroniseWithSymbol": false,
"exportOptions": Object {
Expand All @@ -350,6 +357,7 @@ Object {
"x": 20,
"y": 10,
},
"hasClippingMask": false,
"isFlippedHorizontal": false,
"isFlippedVertical": false,
"isLocked": false,
Expand Down Expand Up @@ -405,6 +413,7 @@ Object {
"red": 1,
},
"changeIdentifier": 0,
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"exportOptions": Object {
"_class": "exportOptions",
Expand All @@ -423,6 +432,7 @@ Object {
},
"hasBackgroundColor": false,
"hasClickThrough": true,
"hasClippingMask": false,
"horizontalRulerData": Object {
"_class": "rulerData",
"base": 0,
Expand Down Expand Up @@ -467,6 +477,7 @@ Object {
Object {
"_class": "rectangle",
"booleanOperation": -1,
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"edited": false,
"exportOptions": Object {
Expand All @@ -485,6 +496,7 @@ Object {
"x": 0,
"y": 0,
},
"hasClippingMask": false,
"hasConvertedToNewRoundCorners": true,
"isFlippedHorizontal": false,
"isFlippedVertical": false,
Expand Down Expand Up @@ -605,6 +617,7 @@ Object {
Object {
"_class": "text",
"automaticallyDrawOnUnderlyingPath": false,
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"dontSynchroniseWithSymbol": false,
"exportOptions": Object {
Expand All @@ -622,6 +635,7 @@ Object {
"x": 20,
"y": 10,
},
"hasClippingMask": false,
"isFlippedHorizontal": false,
"isFlippedVertical": false,
"isLocked": false,
Expand Down Expand Up @@ -677,6 +691,7 @@ Object {
"red": 1,
},
"changeIdentifier": 0,
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"exportOptions": Object {
"_class": "exportOptions",
Expand All @@ -695,6 +710,7 @@ Object {
},
"hasBackgroundColor": false,
"hasClickThrough": true,
"hasClippingMask": false,
"horizontalRulerData": Object {
"_class": "rulerData",
"base": 0,
Expand Down Expand Up @@ -739,6 +755,7 @@ Object {
Object {
"_class": "rectangle",
"booleanOperation": -1,
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"edited": false,
"exportOptions": Object {
Expand All @@ -757,6 +774,7 @@ Object {
"x": 0,
"y": 0,
},
"hasClippingMask": false,
"hasConvertedToNewRoundCorners": true,
"isFlippedHorizontal": false,
"isFlippedVertical": false,
Expand Down Expand Up @@ -877,6 +895,7 @@ Object {
Object {
"_class": "text",
"automaticallyDrawOnUnderlyingPath": false,
"clippingMaskMode": 0,
"do_objectID": "__GUID__",
"dontSynchroniseWithSymbol": false,
"exportOptions": Object {
Expand All @@ -894,6 +913,7 @@ Object {
"x": 20,
"y": 10,
},
"hasClippingMask": false,
"isFlippedHorizontal": false,
"isFlippedVertical": false,
"isLocked": false,
Expand Down
Loading