File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ before_deploy:
25
25
if [ -z "$BEFORE_DEPLOY_RAN" ]; then
26
26
npm --no-git-tag-version version $RELEASE_VERSION
27
27
if [ "$TRAVIS_BRANCH" == "master" ]; then export NPM_TAG=stable; fi
28
+ if [[ "$TRAVIS_BRANCH" == hotfix/* ]]; then export NPM_TAG=hotfix; fi # double brackets are important for matching the wildcard
28
29
git config --global user.email $(git log --pretty=format:"%ae" -n1)
29
30
git config --global user.name $(git log --pretty=format:"%an" -n1)
30
31
export BEFORE_DEPLOY_RAN=true
@@ -36,6 +37,7 @@ deploy:
36
37
- master
37
38
- develop
38
39
- smoke
40
+ - hotfix/*
39
41
condition : $TRAVIS_EVENT_TYPE != cron
40
42
skip_cleanup : true
41
43
email : $NPM_EMAIL
Original file line number Diff line number Diff line change 107
107
"scratch-audio" : " 0.1.0-prerelease.20190114210212" ,
108
108
"scratch-blocks" : " 0.1.0-prerelease.1555512815" ,
109
109
"scratch-l10n" : " 3.2.20190417195644" ,
110
- "scratch-paint" : " 0.2.0-prerelease.20190318170811 " ,
110
+ "scratch-paint" : " 0.2.0-prerelease.20190416185326 " ,
111
111
"scratch-render" : " 0.1.0-prerelease.20190326161919" ,
112
112
"scratch-storage" : " 1.2.2" ,
113
113
"scratch-svg-renderer" : " 0.2.0-prerelease.20190329052730" ,
Original file line number Diff line number Diff line change @@ -83,12 +83,15 @@ class Backpack extends React.Component {
83
83
}
84
84
handleDrop ( dragInfo ) {
85
85
let payloader = null ;
86
+ let presaveAsset = null ;
86
87
switch ( dragInfo . dragType ) {
87
88
case DragConstants . COSTUME :
88
89
payloader = costumePayload ;
90
+ presaveAsset = dragInfo . payload . asset ;
89
91
break ;
90
92
case DragConstants . SOUND :
91
93
payloader = soundPayload ;
94
+ presaveAsset = dragInfo . payload . asset ;
92
95
break ;
93
96
case DragConstants . SPRITE :
94
97
payloader = spritePayload ;
@@ -102,6 +105,19 @@ class Backpack extends React.Component {
102
105
// Creating the payload is async, so set loading before starting
103
106
this . setState ( { loading : true } , ( ) => {
104
107
payloader ( dragInfo . payload , this . props . vm )
108
+ . then ( payload => {
109
+ // Force the asset to save to the asset server before storing in backpack
110
+ // Ensures any asset present in the backpack is also on the asset server
111
+ if ( presaveAsset && ! presaveAsset . clean ) {
112
+ return storage . store (
113
+ presaveAsset . assetType ,
114
+ presaveAsset . dataFormat ,
115
+ presaveAsset . data ,
116
+ presaveAsset . assetId
117
+ ) . then ( ( ) => payload ) ;
118
+ }
119
+ return payload ;
120
+ } )
105
121
. then ( payload => saveBackpackObject ( {
106
122
host : this . props . host ,
107
123
token : this . props . token ,
You can’t perform that action at this time.
0 commit comments