Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed May 22, 2018
0 parents commit 93fb298
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_style = space
indent_size = 2
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
os: osx
osx_image: xcode9.3
language: node_js
node_js: '8'
branches:
only:
- master
git:
depth: false
script:
- ./publish.sh
11 changes: 11 additions & 0 deletions MAINTAINING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Maintaining

Travis is set up to run once every 24 hours. The script in `.travis.yml` clones the latest `master` of HyperDEX and publishes a new nightly build.

You can force a new build immediately with: `git commit --amend --no-edit && git push --force-with-lease`. Can be useful if it's important to get out a build right away.

## Setup

- Add a environment variable to Travis named `GH_TOKEN` with a [GitHub personal access token](https://github.com/settings/tokens/new) with the `public_repo` scope.
- Add a environment variable to Travis named `EP_PRE_RELEASE` to `true`.
- Add a new Travis cron job that runs every day.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# HyperDEX nightlies

**This app is still in private testing phase. The repo has been made public for convenience. Please do not share it.**

[Nightly builds for HyperDEX](https://github.com/lukechilds/hyperdex-nightlies/releases/latest)
22 changes: 22 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

brew install rpm
git clone https://github.com/lukechilds/hyperdex

cd hyperdex/app
LATEST_COMMIT_SHA=$(git rev-parse HEAD)
LATEST_COMMIT_SHA_SHORT=$(git rev-parse --short HEAD)
npx dot-json package.json name 'hyperdex-nightly'
npx dot-json package.json productName 'HyperDEX Nightly'
npx dot-json package.json version "0.0.0-$LATEST_COMMIT_SHA_SHORT-$(echo $(npx utc-version))"

cd ..
LATEST_NIGHTLY_TAG=$(cd .. && git describe --tags $(git rev-list --tags --max-count=1))
NIGHTLY_HYPERDEX_COMMIT=$(git rev-parse $(echo "$LATEST_NIGHTLY_TAG" | cut -d- -f2))
RELEASE_NOTES="Changes: https://github.com/lukechilds/hyperdex/compare/$NIGHTLY_HYPERDEX_COMMIT...$LATEST_COMMIT_SHA"
npx dot-json package.json repository 'lukechilds/hyperdex-nightlies'
npx dot-json package.json build.appId 'com.lukechilds.hyperdex-nightly'

npm install
webpack --mode=production
electron-builder --mac --linux --win --publish=always --config.releaseInfo.releaseNotes "$RELEASE_NOTES" --config.publish.provider=github --config.publish.releaseType=release --config.publish.publishAutoUpdate=false

0 comments on commit 93fb298

Please sign in to comment.