File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
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 @@ -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