Skip to content

Commit

Permalink
add update script (and remove toxcore to check if the script works)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoff99 committed Jul 21, 2024
1 parent 84167fb commit cf51189
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 96,364 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/dep_toxcore_amalgamation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Auto update toxcore amalgamation

on:
schedule:
# runs Tue at 12:00 am
- cron: '0 0 * * 2'
push:
workflow_dispatch:
inputs:
version:
description: dummy
default: dummy


jobs:
auto-update-dependencies:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run auto dependency update
run: ./tools/update_toxcore_amalgamation.sh

- name: check for changes
run: git diff || echo "no changes"

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: toxcore amalgamation
branch: 'create-pull-request/toxcore_amalgamation'
delete-branch: true
title: 'update toxcore amalgamation'



21 changes: 21 additions & 0 deletions tools/update_toxcore_amalgamation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#! /bin/sh
url='https://raw.githubusercontent.com/zoff99/c-toxcore/zoff99/zoxcore_local_fork'

_HOME2_=$(dirname $0)
export _HOME2_
_HOME_=$(cd $_HOME2_;pwd)
export _HOME_

basedir="$_HOME_""/../"

mkdir -p "$basedir"/toxcore/
cd "$basedir"/toxcore/

wget "$url"/amalgamation/toxcore_amalgamation.c -O toxcore_amalgamation.c
wget "$url"/amalgamation/Makefile -O Makefile
mkdir -p tox/
cd tox/
wget -O tox.h "$url"/toxcore/tox.h
wget -O toxutil.h "$url"/toxutil/toxutil.h
wget -O toxav.h "$url"/toxav/toxav.h

13 changes: 0 additions & 13 deletions toxcore/Makefile

This file was deleted.

Loading

0 comments on commit cf51189

Please sign in to comment.