From 3fc42bdd4dd277b5e961d846e02458cbc042335d Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Wed, 11 Apr 2018 22:02:47 -0700 Subject: [PATCH] deploy to dev.pinafore.social using travis --- .travis.yml | 8 +++++--- package-lock.json | 9 +++++++++ package.json | 5 +++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index d47131a9..cd76312f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,14 +52,16 @@ before_install: - ffmpeg -version before_script: - npm run lint -script: npm run test-browser +script: npm run $COMMAND env: global: - PGPORT=5433 + - secure: iR11lD+OAyTJdNoK67esDOrd34HKQboJo0DrVL4xqwoAwQGmNX7posBtcj0TOwVAdHfd5S80xlhWlMebrtHWR9oMtdcBXusWnehZVRB0WE89n8enkJCbAxn5uMpcEpKpDHTcfR/Gbxf2sw15dTy0PrW/ldiZXWf7wybJEBGbrEP7QI8oy3VHzmKpSyjRpN/hnSlgxskVnfIMKPp43D+705Ka7aMJNTWZ5dAdKdIjQWX6j6jlqx6Vl+qIq7td3DTZA9A5ft8HxaWC27F1bbd52PdRY2h8Ii3Ps+n8Q8uZK1KJPp9t3pPk+PmYINu2715ArukRk73kahnFadBQLhytn95FLiyKOLj+ajBNo+o3KIQDs3qRj8gkXpkJpuLAPgwABOEVWuLh9y+oa33IDYVzyESRVtXqbbwgziYVjNQCozP1Nt9+Wyh4YHfdOjEEMdlVlkwlyzPfaLAqVBusEphnaF/vx7itdVvxOMQYNcSRoBrAgciN4ng0GZHi5P85DMXnNV41r+d3JK5JEYZD/gpSja5cPUlpPlkXsKiElG3fEoO2D/Uc8rR9Cu84XiJiJQjP91QuWagfdhgqM4YOndt2YukiGzRzDMjTx1BzSW4S11RQGWzZrv06zmDLXTlnUAMEm1/Exo4L6VfgRvyFmgM0LAT+IceVEHbOKC/Hnd8Y3mo= matrix: include: - - env: BROWSER=chrome:headless - - env: BROWSER=firefox:headless + - env: BROWSER=chrome:headless COMMAND=test-browser + - env: BROWSER=firefox:headless COMMAND=test-browser + - env: COMMAND=deploy-dev allow_failures: - env: BROWSER=firefox:headless branches: diff --git a/package-lock.json b/package-lock.json index be1607f2..01c86343 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4650,6 +4650,15 @@ } } }, + "git-branch-is": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/git-branch-is/-/git-branch-is-0.1.0.tgz", + "integrity": "sha1-vvWmETow9AB+fAAvm6TPN5JcFx8=", + "dev": true, + "requires": { + "commander": "2.12.2" + } + }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", diff --git a/package.json b/package.json index daf9c328..ee58f78e 100644 --- a/package.json +++ b/package.json @@ -24,9 +24,9 @@ "globalize-css": "node ./bin/globalize-css.js", "deglobalize-css": "node ./bin/globalize-css.js --reverse", "stage-dev": "printf 'User-agent: *\nDisallow: /' > assets/robots.txt", - "deploy-dev": "npm run stage-dev && now && sleep 60 && now alias dev.pinafore.social && now rm pinafore --safe --yes", + "deploy-dev": "git-branch-is master && npm run stage-dev && now && sleep 60 && now alias dev.pinafore.social && now rm pinafore --safe --yes", "stage-prod": "rm -f assets/robots.txt", - "deploy-prod": "npm run stage-prod && now && sleep 60 && now alias pinafore.social && now rm pinafore --safe --yes", + "deploy-prod": "git-branch-is master && npm run stage-prod && now && sleep 60 && now alias pinafore.social && now rm pinafore --safe --yes", "backup-mastodon-data": "pg_dump -Fc mastodon_development > fixtures/dump.sql && cd mastodon/public/system && tar -czf ../../../fixtures/system.tgz ." }, "dependencies": { @@ -79,6 +79,7 @@ "yargs": "^10.1.1" }, "devDependencies": { + "git-branch-is": "^0.1.0", "now": "^10.2.2", "standard": "^10.0.3", "testcafe": "^0.19.0"