diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..fad9487 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,44 @@ +sudo: true + +language: bash + +services: + - docker + +env: + global: + - BRANCH="mfsbsd8" + - GITHUB_ENDPOINT="netbootxyz/asset-mirror" + - DEBIAN_FRONTEND="noninteractive" + - BUILD_TYPE="direct_file" + +branches: + only: + - 'mfsbsd8' +if: type != pull_request AND tag IS blank +script: + - | + export EXTERNAL_VERSION=$(curl -sL https://mfsbsd.vx.sk/files/images/8/amd64/ | grep -Po "(\d+\.)+\d+" | tail -n1) + - wget https://raw.githubusercontent.com/netbootxyz/build-pipelines/master/build.sh && chmod +x build.sh + - git config --local user.name $GIT_USERNAME + - git config --local user.email $GIT_EMAIL + - export TRAVIS_TAG=${EXTERNAL_VERSION}-$(echo ${TRAVIS_COMMIT} | cut -c1-8) + - ./build.sh compare ${TRAVIS_TAG} || travis_terminate 0 + - ./build.sh build ${BUILD_TYPE} +before_deploy: +# Tag this commit for release + - git tag ${TRAVIS_TAG} +deploy: + provider: releases + api_key: $GITHUB_TOKEN + file_glob: true + file: buildout/* + skip_cleanup: true + on: + branch: $BRANCH +after_deploy: + - ./build.sh endpoints $TRAVIS_TAG +after_success: + - ./build.sh discord success +after_failure: + - ./build.sh discord failure diff --git a/endpoints.template b/endpoints.template new file mode 100644 index 0000000..1801ff0 --- /dev/null +++ b/endpoints.template @@ -0,0 +1,8 @@ +endpoints: + mfsbsd-8: + path: /asset-mirror/releases/download/REPLACE_RELEASE_NAME/ + files: + - default.img + - special-edition.img + os: "freebsd" + version: "8" diff --git a/settings.sh b/settings.sh new file mode 100644 index 0000000..53fc94e --- /dev/null +++ b/settings.sh @@ -0,0 +1,3 @@ +DOWNLOADS="\ +https://mfsbsd.vx.sk/files/images/8/amd64/mfsbsd-REPLACE_VERSION-RELEASE-amd64.img|default.img +https://mfsbsd.vx.sk/files/images/8/amd64/mfsbsd-se-REPLACE_VERSION-RELEASE-amd64.img|special-edition.img"