こんにちは私はtravis ciの導入をセットアップするのに少し助けが必要です。Travis CIはgit repoにはないビルドファイルを作成します
私は、問題の原因は、githubリポジトリには、私が展開したいビルドファイルがないということです。 .gitignore
ファイルのように私はbuild/
フォルダを持っています。
.travis.yml
ファイル
osx_image: xcode8.3
sudo: required
dist: trusty
language: c
matrix:
include:
- os: osx
- os: linux
env: CC=clang CXX=clang++ npm_config_clang=1
compiler: clang
cache:
directories:
- node_modules
- "$HOME/.electron"
- "$HOME/.cache"
addons:
apt:
packages:
- libgnome-keyring-dev
- icnsutils
before_install:
- mkdir -p /tmp/git-lfs && curl -L https://github.com/github/git-lfs/releases/download/v1.2.1/git-lfs-$([
"$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "darwin")-amd64-1.2.1.tar.gz
| tar -xz -C /tmp/git-lfs --strip-components 1 && /tmp/git-lfs/git-lfs pull
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install --no-install-recommends
-y icnsutils graphicsmagick xz-utils; fi
install:
- nvm install 7
- curl -o- -L https://yarnpkg.com/install.sh | bash
- source ~/.bashrc
- npm install -g xvfb-maybe
- yarn
script:
- yarn run build
branches:
only:
- master
deploy:
provider: s3
access_key_id: MY_ACCESS_KEY_ID
secret_access_key:
secure: MY_SECURE_ACCESS_SECRET
bucket: MY_AWS_BUCKET
local-dir: build/*
acl: bucket_owner_full_control
on:
repo: MY_GITHUB_REPO
env:
matrix:
secure: MY_GITHUB_TOKEN
私はbefore_install
下トラヴィスファイルにいくつかのコードを持っている必要があります知っているが、私はbashのに慣れていない午前と同じように、私はどのように適切に知りません私のbuild
フォルダの.dmg
ファイルのみを参照してください。 (build/*.dmg
)
私が言ったように、ビルドフォルダはgit repoから除外されています。
トラヴィス-CIのエラーログは次のとおりです。
HEAD detached at ca6dfb3
Untracked files:
(use "git add <file>..." to include in what will be committed)
yarn.lock
nothing added to commit but untracked files present (use "git add" to track)
Dropped refs/[email protected]{0} (8ab81738da8330c59a8d91b0b3cef454b607dd3d)
/Users/travis/.rvm/gems/ruby-2.4.1/gems/dpl-1.8.40/lib/dpl/provider/s3.rb:47:in `chdir': No such file or directory @ dir_chdir - build/*.dmg (Errno::ENOENT)
from /Users/travis/.rvm/gems/ruby-2.4.1/gems/dpl-1.8.40/lib/dpl/provider/s3.rb:47:in `push_app'
from /Users/travis/.rvm/gems/ruby-2.4.1/gems/dpl-1.8.40/lib/dpl/provider.rb:154:in `block in deploy'
from /Users/travis/.rvm/gems/ruby-2.4.1/gems/dpl-1.8.40/lib/dpl/cli.rb:41:in `fold'
from /Users/travis/.rvm/gems/ruby-2.4.1/gems/dpl-1.8.40/lib/dpl/provider.rb:154:in `deploy'
from /Users/travis/.rvm/gems/ruby-2.4.1/gems/dpl-1.8.40/lib/dpl/provider/s3.rb:75:in `deploy'
from /Users/travis/.rvm/gems/ruby-2.4.1/gems/dpl-1.8.40/lib/dpl/cli.rb:32:in `run'
from /Users/travis/.rvm/gems/ruby-2.4.1/gems/dpl-1.8.40/lib/dpl/cli.rb:7:in `run'
from /Users/travis/.rvm/gems/ruby-2.4.1/gems/dpl-1.8.40/bin/dpl:5:in `<top (required)>'
from /Users/travis/.rvm/gems/ruby-2.4.1/bin/dpl:23:in `load'
from /Users/travis/.rvm/gems/ruby-2.4.1/bin/dpl:23:in `<main>'
failed to deploy
/Users/travis/.travis/job_stages: line 878: shell_session_update: command not found
これが機能しました!しかし、特定のファイル拡張子ビルド/ * .dmgを指した後も、それはまだ壊れています。それは何ですか? – desicne
'local_dir'は明らかにグロブパターンではなくディレクトリ名をとります。 'before_deploy'では、次のいずれかを行います:a)ビルド/ * .dmgファイルを移動するディレクトリを作成したい場合は、それに応じて' local_dir'の値を調整します。またはb)パターンにマッチしない 'build'のすべてのファイルを削除します。 – banzaiman