Skip to content

Commit

Permalink
[travis] Finish deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
thislooksfun committed Nov 29, 2017
1 parent 334ab8b commit b050aef
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

set -ev

# git clone https://github.com/thislooksfun/compiled_mustache.wiki.git
# grind doc_benchmark_wiki
# cd compiled_mustache.wiki
# git add -A
# git commit -m "Update Benchmarks"
# git push
git clone https://github.com/thislooksfun/compiled_mustache.wiki.git
grind doc_benchmark_wiki
cd compiled_mustache.wiki
git add -A
git commit -m "Update Benchmarks"
git push

# If it already exists, clean it out
if [ -d "deploy_staging" ]; then
Expand All @@ -32,14 +32,28 @@ cp_dep "lib"
cp_dep "test"

# Files
cp_dep ".gitignore"
cp_dep ".gitmodules"
cp_dep "CHANGELOG.md"
cp_dep "LICENSE"
cp_dep "pubspec.yaml"
cp_dep "README.md"

cd "deploy_staging"

# TODO: Hide scripts/ and tool/ directories before running this
# pub publish --dry-run
rm -rf "doc/api" # Don't upload api docs, those will be generated automatically

pub publish --dry-run # Dry run to ensure no errors / warnings

mkdir -p .pub-cache

# Setup Pub's authentication
cat <<EOF > ~/.pub-cache/credentials.json
{
"accessToken":"$accessToken",
"refreshToken":"$refreshToken",
"tokenEndpoint":"$tokenEndpoint",
"scopes":["$scopes"],
"expiration":$expiration
}
EOF

pub publish --force # Force to bypass 'are you sure' check

0 comments on commit b050aef

Please sign in to comment.