publish-particle-library.sh 487 B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. set -eu
  3. SOURCE_DIR="$(dirname "$0")/../.."
  4. WORK_DIR=$(mktemp -d)
  5. trap 'rm -rf "$WORK_DIR"' EXIT
  6. cp "$SOURCE_DIR/README.md" "$WORK_DIR/README.md"
  7. cp "$SOURCE_DIR/CHANGELOG.md" "$WORK_DIR/CHANGELOG.md"
  8. cp "$SOURCE_DIR/library.properties" "$WORK_DIR/library.properties"
  9. cp "$SOURCE_DIR/LICENSE.txt" "$WORK_DIR/LICENSE.txt"
  10. cp -r "$SOURCE_DIR/src" "$WORK_DIR/"
  11. cp -r "$SOURCE_DIR/examples" "$WORK_DIR/"
  12. cd "$WORK_DIR"
  13. particle library upload
  14. particle library publish