Skip to content

Commit

Permalink
Migrated from Appveyor to Github CI.
Browse files Browse the repository at this point in the history
 - Added a python script to automatically install a version
 that depends on the number of commits.
  • Loading branch information
23rd committed Aug 27, 2019
1 parent 2017f21 commit 87bdc48
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 17 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Java CI

on: [push]

jobs:
build:

runs-on: windows-latest

steps:
- name: Clone.
uses: actions/checkout@v1
- name: Set up JDK 1.8.
run: |
choco install jdk8 -params 'installdir=c:\\java8'
- name: Set up version of Chatty.
run: |
git checkout master
git remote add upstream https://github.com/chatty/chatty
git fetch --all
git branch master --set-upstream-to upstream/master
git status
git status > ch.txt
python version.py
- name: Build with Gradle.
run: |
gradlew build && gradlew release
- name: Build with installers.
run: |
./win_standalone.bat
- uses: actions/upload-artifact@master
name: Upload artifacts.
with:
name: Chatty
path: build\releases\
16 changes: 0 additions & 16 deletions appveyor.yml

This file was deleted.

24 changes: 24 additions & 0 deletions version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import re

file = open('ch.txt','r');
str = file.readlines()[1];
sub = str[45:48];
print(sub);

path = "src/chatty/Chatty.java";
chatty = open(path, 'r');
line = chatty.read();
chatty.close();

if not line:
exit(1);

chatty = open(path, 'w');
line = re.sub(
r"public static final String VERSION = \"0.10.0.[0-9]+",
"public static final String VERSION = \"0.10.0.%s" % sub,
line
);
#print(line)
chatty.write(line);
chatty.close();
4 changes: 3 additions & 1 deletion win_standalone.bat
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
gradlew windowsZip -PjavapackagerPath="c:\Program Files\Java\jdk1.8.0\bin\javapackager.exe" && gradlew innosetup -PinnosetupPath="c:\Program Files (x86)\Inno Setup 5\ISCC.exe" && gradlew innosetupStandalone -PinnosetupPath="c:\Program Files (x86)\Inno Setup 5\ISCC.exe" -PjavapackagerPath="c:\Program Files\Java\jdk1.8.0\bin\javapackager.exe"
( gradlew windowsZip -PjavapackagerPath="c:\java8\bin\javapackager.exe"
gradlew innosetup -PinnosetupPath="c:\Program Files (x86)\Inno Setup 6\ISCC.exe"
gradlew innosetupStandalone -PinnosetupPath="c:\Program Files (x86)\Inno Setup 6\ISCC.exe" -PjavapackagerPath="c:\java8\bin\javapackager.exe")

0 comments on commit 87bdc48

Please sign in to comment.