Skip to content

Commit

Permalink
feat(deploy): simple osx deploy script
Browse files Browse the repository at this point in the history
* added simple script to build tar archive with all debug/release
  binaries.
* slightly improved docker script, even though it would need additional
  work. For now, I use the cloud VM anyway
  • Loading branch information
Byron committed Apr 26, 2015
1 parent de85fb4 commit c248301
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .docker-build-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# make cargo-cli ARGS="build --release"
# DEBUG: only try to build a small CLI for now
make discovery1-cli-cargo ARGS="build --release"
find gen -executable -type f -path "*/release/*" -not \( -name "*.*" -or -name "*script*" \) | xargs cp -v /build-result
find gen -executable -type f -path "*/release/*" -not \( -name "*.*" -or -name "*script*" \) | xargs -J % cp -v % /build-result
13 changes: 13 additions & 0 deletions .osx-deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
echo "NOTE: I assume you have called the respective make cargo-cli ARGS=build beforehand"
version=${1:?First argument must be the version CLI we deploy, like v0.1.0}
rtype=${2:?Second argument is either 'release' or 'debug'}

tar_basename=google-apis-rs_cli-${version}_osx-10.10_${rtype}
tar_file=${tar_basename}.tar.gz
dest_dir=build/$tar_basename
mkdir -p $dest_dir || exit $?
find -E gen -perm +0111 -type f -path "*/${rtype}/*" -not \( -name "*.*" -or -name "*script*" -or -regex ".*-[a-f0-9]{16}" \) | xargs -J % cp -v % $dest_dir || exit $?
(cd build && tar -czvf ${tar_file} ${tar_basename}) || exit $?
rm -Rfv $dest_dir || exit $?
echo Wrote build/$tar_file

0 comments on commit c248301

Please sign in to comment.