Browse Source

ci: don't mention travis

mcspr-patch-1
Maxim Prokhorov 3 years ago
parent
commit
3a34d555d5
7 changed files with 15 additions and 18 deletions
  1. +2
    -2
      CONTRIBUTING.md
  2. +1
    -1
      README.md
  3. +6
    -8
      code/build.sh
  4. +1
    -1
      code/scripts/generate_release_sh.py
  5. +1
    -1
      code/scripts/pio_main.py
  6. +1
    -1
      code/scripts/pio_pre.py
  7. +3
    -4
      pre-commit

+ 2
- 2
CONTRIBUTING.md View File

@ -8,9 +8,9 @@ Second. Let's try to keep it homogeneous and readable. I have my coding style. I
* Do the pull request against the **`dev` branch**
* **Only touch relevant files** (beware if your editor has auto-formatting feature enabled)
* If you are adding a new functionality (new hardware, new library support) not related to an existing component move it to it's **own modules** (.ino file)
* If you are adding new library, include it in one of the **sample travis profiles**, so our integrated CI will try to compile it.
* If you are adding new library, include it in one of the [**sample test/build/*.h profiles**](https://github.com/xoseperez/espurna/tree/dev/code/test/build), so our integrated CI will try to compile it.
* Make sure you check [Coding Style](https://github.com/xoseperez/espurna/wiki/CodingStyle)
* PRs that don't compile (break Travis) or cause more coding errors (as reported by Codacy) will not be merged. Please fix the issue. Same goes for PRs that are raised against older commit in dev - you might need to rebase and resolve conflicts.
* PRs that don't compile or cause more coding errors will not be merged. Please fix the issue. Same goes for PRs that are raised against older commit in dev - you might need to rebase and resolve conflicts.
And thank you again!

+ 1
- 1
README.md View File

@ -6,7 +6,7 @@ It uses the Arduino Core for ESP8266 framework and a number of 3rd party librari
[![version](https://img.shields.io/badge/version-1.15.0--dev-brightgreen.svg)](CHANGELOG.md)
[![branch](https://img.shields.io/badge/branch-dev-orange.svg)](https://github.com/xoseperez/espurna/tree/dev/)
[![license](https://img.shields.io/github/license/xoseperez/espurna.svg)](LICENSE)
[![travis](https://travis-ci.org/xoseperez/espurna.svg?branch=dev)](https://travis-ci.org/xoseperez/espurna)
[![ci build](https://github.com/xoseperez/espurna/workflows/ESPurna%20build/badge.svg?branch=dev)](https://github.com/xoseperez/espurna/actions)
[![codacy](https://api.codacy.com/project/badge/Grade/c9496e25cf07434cba786b462cb15f49)](https://www.codacy.com/app/xoseperez/espurna/dashboard)
<br />
[![latest master build](https://img.shields.io/github/release/xoseperez/espurna/all.svg?label=latest%20master%20build)](https://github.com/xoseperez/espurna/releases/latest)


+ 6
- 8
code/build.sh View File

@ -26,9 +26,9 @@ script_build_webui=true
release_mode=false
if ${TRAVIS:-false}; then
git_revision=${TRAVIS_COMMIT::7}
git_tag=${TRAVIS_TAG}
if ${CI:-false}; then
git_revision=${GITHUB_SHA::8}
git_tag=$(echo -n $GITHUB_REF | grep '^refs/tags/' | cut -d '/' -f 2)
elif is_git; then
git_revision=$(git rev-parse --short HEAD)
git_tag=$(git tag --contains HEAD)
@ -86,9 +86,8 @@ build_webui() {
echo "Building web interface..."
node node_modules/gulp/bin/gulp.js || exit
# TODO: do something if webui files are different
# for now, just print in travis log
if ${TRAVIS:-false}; then
# TODO: do something if webui files are different?
if ${CI:-false}; then
git --no-pager diff --stat
fi
}
@ -114,8 +113,7 @@ build_environments() {
platformio run --silent --environment $environment || exit 1
echo -n "SIZE: "
stat_bytes .pio/build/$environment/firmware.bin
[[ "${TRAVIS_BUILD_STAGE_NAME}" = "Test" ]] || \
mv .pio/build/$environment/firmware.bin $destination/espurna-$version/espurna-$version-$environment.bin
mv .pio/build/$environment/firmware.bin $destination/espurna-$version/espurna-$version-$environment.bin
done
echo "--------------------------------------------------------------"
}


+ 1
- 1
code/scripts/generate_release_sh.py View File

@ -22,7 +22,7 @@ import shlex
import configparser
import collections
CI = any([os.environ.get("TRAVIS"), os.environ.get("CI")])
CI = "true" == os.environ.get("CI", "false")
Build = collections.namedtuple("Build", "env extends build_flags src_build_flags")


+ 1
- 1
code/scripts/pio_main.py View File

@ -25,7 +25,7 @@ Import("env", "projenv")
import os
CI = any([os.environ.get("TRAVIS"), os.environ.get("CI")])
CI = "true" == os.environ.get("CI")
# Always show warnings for project code
projenv.ProcessUnFlags("-w")


+ 1
- 1
code/scripts/pio_pre.py View File

@ -22,7 +22,7 @@ from SCons.Script import ARGUMENTS
from espurna_utils.release import merge_cpp
CI = any([os.environ.get("TRAVIS"), os.environ.get("CI")])
CI = "true" == os.environ.get("CI")
PIO_PLATFORM = env.PioPlatform()
CONFIG = env.GetProjectConfig()
VERBOSE = "1" == ARGUMENTS.get("PIOVERBOSE", "0")


+ 3
- 4
pre-commit View File

@ -3,11 +3,11 @@
Referencing current branch in github README.md [1]
This pre-commit hook [2] updates the README.md file's
Travis badge with the current branch. Based on [4].
CI badge [3] with the current branch. Based on [4].
[1] http://stackoverflow.com/questions/18673694/referencing-current-branch-in-github-readme-md
[2] http://www.git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
[3] https://docs.travis-ci.com/user/status-images/
[3] https://github.com/xoseperez/espurna/actions
[4] https://gist.github.com/dandye/dfe0870a6a1151c89ed9
Copy this file to .git/hooks/
@ -94,8 +94,7 @@ def espurna_get_version(base, version_h="code/espurna/config/version.h"):
TEMPLATES = {
"![travis]": "[![travis](https://travis-ci.org/{USER}/{REPO}.svg?branch={BRANCH})]"
"(https://travis-ci.org/{USER}/{REPO})\n",
"![ci]": "![ci](https://github.com/{USER}/{REPO}/workflows/ESPurna%20build/badge.svg?branch={BRANCH})\n"
"![version]": "[![version](https://img.shields.io/badge/version-{VERSION:escape_hyphen}-brightgreen.svg)]"
"(CHANGELOG.md)\n",
"![branch]": "[![branch](https://img.shields.io/badge/branch-{BRANCH:escape_hyphen}-orange.svg)]"


Loading…
Cancel
Save