From b2ccab47c21fe46063ac5e30e843a7cd6c50939d Mon Sep 17 00:00:00 2001 From: baalajimaestro Date: Thu, 25 Jul 2019 01:59:35 +0530 Subject: [PATCH] [CI/CD]: Use TravisCI for merging staging into master Signed-off-by: baalajimaestro --- .travis.yml | 13 +++++++++++++ init/Merge.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .travis.yml create mode 100644 init/Merge.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..22d13ab83 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,13 @@ +language: bash + +dist: xenial + +python: + - "3.7.3" + +script: + - bash init/Merge.sh + +branches: + only: + - master diff --git a/init/Merge.sh b/init/Merge.sh new file mode 100644 index 000000000..2c7eee333 --- /dev/null +++ b/init/Merge.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# Copyright (C) 2019 The Raphielscape Company LLC. +# +# Licensed under the Raphielscape Public License, Version 1.b (the "License"); +# you may not use this file except in compliance with the License. +# +# CI Runner Script for baalajimaestro's userbot + +# We need this directive +# shellcheck disable=1090 + +export SEMAPHORE_PROJECT_DIR=`pwd` +. "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/telegram +TELEGRAM_TOKEN=${BOT_API_KEY} +export BOT_API_KEY TELEGRAM_TOKEN +tg_sendinfo "I am gonna merge staging into master" +cd +git clone https://github.com/RaphielGang/Telegram-UserBot.git +cd Telegram-UserBot +git remote rm origin +git remote add origin https://baalajimaestro:${GH_PERSONAL_TOKEN}@github.com/raphielgang/telegram-userbot.git +git fetch +git checkout staging +git pull origin staging +git push --quiet origin staging:master +tg_sendinfo "I have merged all commits from staging into master"