Skip to content

Commit

Permalink
fix: travis ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Markkop committed Apr 23, 2020
1 parent cc58cb5 commit b728866
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 24 deletions.
71 changes: 57 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,66 @@
language: node_js
node_js: '10.18.0'

node_js:
- '11.6.0'

matrix:
include:
# - os: osx
# osx_image: xcode10.2
# language: node_js
# node_js: "11.6.0"
# env:
# - ELECTRON_CACHE=$HOME/.cache/electron
# - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder

- os: linux
dist: trusty
sudo: required
services: docker
language: generic

notifications:
email: false

# cache some files for faster builds
cache:
yarn: true
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
- $HOME/.npm/_prebuilds

env:
global:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
# add git lfs for large file support
# before_install:
# - |
# if [ "$TRAVIS_OS_NAME" == "osx" ]; then
# mkdir -p /tmp/git-lfs && curl -L https://github.com/github/git-lfs/releases/download/v2.3.1/git-lfs-$([ "$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "darwin")-amd64-2.3.1.tar.gz | tar -xz -C /tmp/git-lfs --strip-components 1
# export PATH="/tmp/git-lfs:$PATH"
# fi
# before_script:
# - git lfs pull

jobs:
include:
- stage: Deploy linux
if: tag IS present
os: linux
dist: trusty
script:
- npm run release
# on PRs and merges to master and prod run tests and build the app
script:
- yarn build
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
docker run --rm \
-v ${PWD}:/project \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:wine \
/bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn dist:linux"
else
yarn test
fi
deploy:
skip_cleanup: true
provider: releases
api_key: $GH_TOKEN
file_glob: true
file:
- 'dist/*.AppImage'
on:
all_branches: true
29 changes: 20 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,28 @@

## What it is

This tool downloads a Youtube video to `videos` folder and cuts it given a starting and an ending time.\
The time must be in the format `HH:MM:SS` and the duration can't be longer than 24 hours.
This app downloads youtube videos using youtube-dl and cuts them with ffmpeg given starting and ending times.
Currently only Windows e Linux platforms are supported.

## How to use

- Install NodeJS and ffmpeg
- Clone or download this repository
- Run `npm start` inside the project's folder
- Provide required information
- Check `videos` folder
Download the binary according to your OS:

## User Options
- Linux
- Windows

![An example of user options](http://i.imgur.com/avvmjF8.png)
## How to develop

Clone this repository and run `yarn` to install dependencies.
Make sure to have `node` and `npm` installed.

## Options

- Youtube url (required)
Can be a shortened version or a normal one

- Starting and ending times (required)
In the HH:MM:SS format. It can't be longer than 24h

- Convert to mp3
It converts the same output to mp3
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dist:win": "electron-builder build --win portable ",
"dist": "electron-builder build --win portable --linux AppImage ",
"build": "babel src --out-dir build",
"release": "build"
"release": "yarn build && electron-builder"
},
"keywords": [],
"author": "Marcelo 'Mark' Kopmann",
Expand Down

0 comments on commit b728866

Please sign in to comment.