Skip to content

Commit deb7f62

Browse files
committed
update mirror site automatically when publish to pub.dev
1 parent fc6e3c8 commit deb7f62

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

deploy

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,5 +105,24 @@ info "Step 4 Run publish --dry-run"
105105
flutter pub publish --dry-run
106106
confirm
107107

108+
info "read pub.dev mirror site"
109+
hostUrl=$PUB_HOSTED_URL
110+
storageUrl=$FLUTTER_STORAGE_BASE_URL
111+
warning "PUB_HOSTED_URL=$PUB_HOSTED_URL"
112+
warning "FLUTTER_STORAGE_BASE_URL=$FLUTTER_STORAGE_BASE_URL"
113+
114+
info "remove environment variables"
115+
export PUB_HOSTED_URL=""
116+
export FLUTTER_STORAGE_BASE_URL=""
117+
warning "PUB_HOSTED_URL=$PUB_HOSTED_URL"
118+
warning "FLUTTER_STORAGE_BASE_URL=$FLUTTER_STORAGE_BASE_URL"
119+
108120
info "Step 5 Publish to pub.dev"
109121
flutter pub publish
122+
123+
info "reset environment variables"
124+
export PUB_HOSTED_URL=$hostUrl
125+
export FLUTTER_STORAGE_BASE_URL=$storageUrl
126+
127+
warning "PUB_HOSTED_URL=$PUB_HOSTED_URL"
128+
warning "FLUTTER_STORAGE_BASE_URL=$FLUTTER_STORAGE_BASE_URL"

0 commit comments

Comments
 (0)