diff --git a/.gitignore b/.gitignore index 9a19799..00463e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ build SKIP* -*TOKEN* EDIT diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 33f8959..0000000 --- a/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ -dist: xenial -sudo: required -addons: - apt: - packages: - - quilt - - parted - - realpath - - qemu-user-static - - zerofree - - pxz - - zip - - dosfstools - - bsdtar - - libcap2-bin - - grep - - rsync - - xz-utils -install: - # Workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857338 - - wget "http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.78+nmu1ubuntu1_all.deb" - - sudo dpkg --install debootstrap_1.0.78+nmu1ubuntu1_all.deb -script: - - sudo ./prebuild.sh -before_deploy: - # Workaround for https://github.com/travis-ci/dpl/issues/542 - - sudo chown $(id -u) build/deploy/*.zip -deploy: - provider: releases - api_key: $GITHUB_TOKEN - file: build/deploy/*.zip - file_glob: true - skip_cleanup: true - name: $TRAVIS_TAG - on: - branch: master - tags: true diff --git a/README.md b/README.md index ec81ddd..4c983e7 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,6 @@ We are using identical login: `pi` and password: `raspberry`, as official Raspbi 3. Build image ## How to generate Turtle OS - * To download files from Github with no limit you need [Github token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/), place `GITHUB_TOKEN` file with content `GITHUB_TOKEN=...` in project root * Build all stages `sudo ./prebuild.sh` * Build only stage3 `sudo ./prebuild.sh -s` diff --git a/pi-gen-overlay/stage3/10-install-tcs/00-run.sh b/pi-gen-overlay/stage3/10-install-tcs/00-run.sh index 58f5e21..b6c9e41 100755 --- a/pi-gen-overlay/stage3/10-install-tcs/00-run.sh +++ b/pi-gen-overlay/stage3/10-install-tcs/00-run.sh @@ -1,13 +1,10 @@ #!/bin/bash -e -echo "=> Retrieving latest TCS..." -# wget -q $(wget -q -O - 'https://api.github.com/repos/TurtleRover/tcs/releases/latest' | jq -r '.assets[0].browser_download_url') -O ./tcs.deb +echo "=> Retrieving TCS..." -URL=$(curl -sS --header "Authorization: token $GITHUB_TOKEN" \ - --header 'Accept: application/vnd.github.v3.raw' \ - https://api.github.com/repos/TurtleRover/tcs/releases/latest | jq -r '.assets[0].browser_download_url') +URL="https://github.com/TurtleRover/tcs/releases/download/0.13.5/turtlerover-tcs_0.13.5-8_all.deb" -mkdir "$ROOTFS_DIR"/tmp/install +mkdir -p "$ROOTFS_DIR"/tmp/install curl -L $URL --output "$ROOTFS_DIR"/tmp/install/tcs.deb on_chroot << EOF diff --git a/pi-gen-overlay/stage3/11-install-openocd/00-run.sh b/pi-gen-overlay/stage3/11-install-openocd/00-run.sh index ffbde3a..5ccd83b 100755 --- a/pi-gen-overlay/stage3/11-install-openocd/00-run.sh +++ b/pi-gen-overlay/stage3/11-install-openocd/00-run.sh @@ -1,10 +1,8 @@ #!/bin/bash -e -echo "=> Retrieving latest OpenOCD..." +echo "=> Retrieving OpenOCD..." -URL=$(curl -sS --header "Authorization: token $GITHUB_TOKEN" \ - --header 'Accept: application/vnd.github.v3.raw' \ - https://api.github.com/repos/TurtleRover/turtleos-openocd/releases/latest | jq -r '.assets[0].browser_download_url') +URL="https://github.com/TurtleRover/turtleos-openocd/releases/download/0.10.0-5/turtlerover-openocd_0.10.0-5_armhf.deb" curl -L $URL --output "$ROOTFS_DIR"/tmp/install/openocd.deb diff --git a/prebuild.sh b/prebuild.sh index 05fa45e..f12d082 100755 --- a/prebuild.sh +++ b/prebuild.sh @@ -16,19 +16,14 @@ export IMG_DATE="$(date +%Y%m%d)" export DEBIAN_FRONTEND='noninteractive' export LC_ALL='C.UTF-8' -if [ -n "${TRAVIS_TAG:-}" ]; then - export IMG_FILENAME="${IMG_NAME}-${TRAVIS_TAG}-${IMG_DATE}" +if [ -n "${GIT_TAG:-}" ]; then + export IMG_FILENAME="${IMG_NAME}-${GIT_TAG}-${IMG_DATE}" else export IMG_FILENAME="${IMG_NAME}-${IMG_DATE}" fi export ZIP_FILENAME=$IMG_FILENAME -if ! [ -n "${GITHUB_TOKEN:-}" ]; then - . GITHUB_TOKEN - export GITHUB_TOKEN="$GITHUB_TOKEN" -fi - cd "$(dirname "$0")" mkdir -p build cd build