-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
646 additions
and
1,107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from subprocess import check_output | ||
import sys | ||
import os | ||
import platform | ||
import subprocess | ||
|
||
dir_path = os.path.dirname(os.path.realpath(__file__)) | ||
os.chdir(dir_path) | ||
|
||
# http://stackoverflow.com/questions/11210104/check-if-a-program-exists-from-a-python-script | ||
def is_tool(name): | ||
cmd = "where" if platform.system() == "Windows" else "which" | ||
try: | ||
check_output([cmd, "git"]) | ||
return True | ||
except: | ||
return False; | ||
|
||
version = "UNKNOWN" | ||
|
||
if is_tool("git"): | ||
try: | ||
version = check_output(["git", "describe", "--always"]).rstrip() | ||
except: | ||
try: | ||
version = check_output(["git", "rev-parse", "--short", "HEAD"]).rstrip() | ||
except: | ||
pass | ||
pass | ||
|
||
sys.stdout.write("-DEPAPER_TEMPLATES_VERSION=%s %s" % (version, ' '.join(sys.argv[1:]))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
set -eo pipefail | ||
|
||
PROJECT_NAME="epaper_templates" | ||
|
||
prepare_log() { | ||
echo "[prepare release] -- $@" | ||
} | ||
|
||
if [ -z "$(git tag -l --points-at HEAD)" ]; then | ||
prepare_log "Skipping non-tagged commit." | ||
exit 0 | ||
fi | ||
|
||
VERSION=$(git describe) | ||
|
||
prepare_log "Preparing release for tagged version: $VERSION" | ||
|
||
mkdir -p dist | ||
|
||
for file in $(ls .pioenvs/**/firmware.bin); do | ||
env_dir=$(dirname "$file") | ||
env=$(basename "$env_dir") | ||
|
||
cp "$file" "dist/${PROJECT_NAME}_${env}-${VERSION}.bin" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,25 @@ | ||
# Continuous Integration (CI) is the practice, in software | ||
# engineering, of merging all developer working copies with a shared mainline | ||
# several times a day < http://docs.platformio.org/page/ci/index.html > | ||
# | ||
# Documentation: | ||
# | ||
# * Travis CI Embedded Builds with PlatformIO | ||
# < https://docs.travis-ci.com/user/integration/platformio/ > | ||
# | ||
# * PlatformIO integration with Travis CI | ||
# < http://docs.platformio.org/page/ci/travis.html > | ||
# | ||
# * User Guide for `platformio ci` command | ||
# < http://docs.platformio.org/page/userguide/cmd_ci.html > | ||
# | ||
# | ||
# Please choice one of the following templates (proposed below) and uncomment | ||
# it (remove "# " before each line) or use own configuration according to the | ||
# Travis CI documentation (see above). | ||
# | ||
|
||
|
||
# | ||
# Template #1: General project. Test it using existing `platformio.ini`. | ||
# | ||
|
||
# language: python | ||
# python: | ||
# - "2.7" | ||
# | ||
# sudo: false | ||
# cache: | ||
# directories: | ||
# - "~/.platformio" | ||
# | ||
# install: | ||
# - pip install -U platformio | ||
# | ||
# script: | ||
# - platformio run | ||
|
||
|
||
# | ||
# Template #2: The project is intended to by used as a library with examples | ||
# | ||
|
||
# language: python | ||
# python: | ||
# - "2.7" | ||
# | ||
# sudo: false | ||
# cache: | ||
# directories: | ||
# - "~/.platformio" | ||
# | ||
# env: | ||
# - PLATFORMIO_CI_SRC=path/to/test/file.c | ||
# - PLATFORMIO_CI_SRC=examples/file.ino | ||
# - PLATFORMIO_CI_SRC=path/to/test/directory | ||
# | ||
# install: | ||
# - pip install -U platformio | ||
# | ||
# script: | ||
# - platformio ci --lib="." --board=ID_1 --board=ID_2 --board=ID_N | ||
language: python | ||
python: | ||
- '2.7' | ||
sudo: false | ||
cache: | ||
directories: | ||
- "~/.platformio" | ||
install: | ||
- pip install -U https://github.com/platformio/platformio-core/archive/develop.zip | ||
- platformio lib install | ||
script: | ||
- platformio run | ||
before_deploy: | ||
- ./.prepare_release | ||
deploy: | ||
provider: releases | ||
prerelease: true | ||
api_key: | ||
secure: l9roDX5nWmdLfdKRfBUVM8dPJQ+kfdCKlJklIoN2D2C1lK0VeqKyLKZBCYrZImbo0R1XUGeJrPpbxm13375WmRsKO8RYUx2AG0R0k3BCkreOkMpaiWhDzzLjn1wARI1TRD5HB9kR2o4pYL06tmNgv6pVGthVImyIrDQHpAZGc5VxSUbG40j9/0oHYGgCvraR2KmPsB1oL5obk0jy+eiBFfpMqDsSHz9R+amhjRU257XvYx7yHGQFI897FaaL9uO+vq7WpdwU/tvYyXcvfzWcdAsPs2ZysoEcKCIGpuLbJGNkVPT/C2A6Kxmvxvlrx34W45bJ9QbOSV8Xkov6jZN41IeV2KQ8iZ+6ALtRtUxvFxJxYd1MOP842/eYR/pR5hHNqp3vr3qsUHLGLXgQkPsMB72M7KjTs5jU2U7gLa/Vat87qnN72HZ5mnn3HgmyCgY7THo7qoDVjH7Y7SHIQsws6sQm+Q2CcXMIxbDMocvnFcNLhzbE/In1hxsZAWVSzEIG8lWS+1XO9pdcaxy4XozzYAwv0xr8K8EXqKc+sIFi0RJgbLBTFKSbaOCBm5u/mtz87srZCHzD0BLJanT+NPY3JuiA6yFom9BjwGr3hYlLd9GxAUUG/r9uKrqLfz7G2LW0lnCTsQHFwt54FHyQcfUGIUZ2hcnX0qnal7X2cn2QZ4w= | ||
file_glob: true | ||
skip_cleanup: true | ||
file: dist/*.bin | ||
on: | ||
repo: sidoh/epaper_templates | ||
tags: true |
Oops, something went wrong.