Skip to content

Commit 369a1c6

Browse files
committed
Added pub.dev automation
1 parent b99b279 commit 369a1c6

File tree

4 files changed

+60
-0
lines changed

4 files changed

+60
-0
lines changed

src/SDK/Language/Dart.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,12 @@ public function getFiles()
317317
'template' => '/dart/docs/example.md.twig',
318318
'minify' => false,
319319
],
320+
[
321+
'scope' => 'default',
322+
'destination' => '.travis.yml',
323+
'template' => '/dart/.travis.yml.twig',
324+
'minify' => false,
325+
],
320326
];
321327
}
322328
}

src/SDK/Language/Flutter.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ public function getFiles()
9191
'template' => '/flutter/docs/example.md.twig',
9292
'minify' => false,
9393
],
94+
[
95+
'scope' => 'default',
96+
'destination' => '.travis.yml',
97+
'template' => '/flutter/.travis.yml.twig',
98+
'minify' => false,
99+
],
94100
];
95101
}
96102
}

templates/dart/.travis.yml.twig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
language: dart
2+
3+
dart: stable
4+
5+
os: linux
6+
7+
install:
8+
- mkdir -p ~/.pub-cache
9+
- |
10+
cat <<EOF > ~/.pub-cache/credentials.json
11+
{
12+
"accessToken":"$PUB_ACCESS_TOKEN",
13+
"refreshToken":"$PUB_REFRESH_TOKEN",
14+
"tokenEndpoint":"$PUB_TOKEN_EDNPOINT",
15+
"scopes":["https://www.googleapis.com/auth/plus.me","https://www.googleapis.com/auth/userinfo.email"],
16+
"expiration":$PUB_EXPIRATION
17+
}
18+
19+
deploy:
20+
provider: script
21+
skip_cleanup: true
22+
script: pub publish -f
23+
on:
24+
tags: true

templates/flutter/.travis.yml.twig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
language: dart
2+
3+
dart: stable
4+
5+
os: linux
6+
7+
install:
8+
- mkdir -p ~/.pub-cache
9+
- |
10+
cat <<EOF > ~/.pub-cache/credentials.json
11+
{
12+
"accessToken":"$PUB_ACCESS_TOKEN",
13+
"refreshToken":"$PUB_REFRESH_TOKEN",
14+
"tokenEndpoint":"$PUB_TOKEN_EDNPOINT",
15+
"scopes":["https://www.googleapis.com/auth/plus.me","https://www.googleapis.com/auth/userinfo.email"],
16+
"expiration":$PUB_EXPIRATION
17+
}
18+
19+
deploy:
20+
provider: script
21+
skip_cleanup: true
22+
script: pub publish -f
23+
on:
24+
tags: true

0 commit comments

Comments
 (0)