Skip to content

Commit

Permalink
merge Release v3.6.6 into develop and update change log (#7594)
Browse files Browse the repository at this point in the history
* Bugfix / fix dcs search (#7589)

* update tc-source-content-updater

* update resources

* fix for duplicate twl fetch.

* update resources

* added pre-release resources to resource bundle

* update tc-source-content-updater

---------

Co-authored-by: PhotoNomad0 <[email protected]>

* clear out older resources (#7590)

Co-authored-by: PhotoNomad0 <[email protected]>

* bugfix / fix owner for missing original language (#7591)

* fix owner for missing original language

* update tc-source-content-updater

* update deperecated upload-artifact

* update deperecated upload-artifact

* fix paths for upload-artifact

---------

Co-authored-by: PhotoNomad0 <[email protected]>

* update CHANGELOG.md

* update python script for latest release

* update python script for latest release

---------

Co-authored-by: PhotoNomad0 <[email protected]>
  • Loading branch information
PhotoNomad0 and PhotoNomad0 authored Sep 20, 2024
1 parent 37278f2 commit 171828b
Show file tree
Hide file tree
Showing 114 changed files with 40,460 additions and 250 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ jobs:
# skip_fetch: true
# skip_checkout: true

- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
name: Upload jsdocs
with:
name: jsdocs
path: ./docs/
path: docs/

build-linux:
name: Build Linux
Expand Down Expand Up @@ -222,13 +222,13 @@ jobs:
run: echo "ARTIFACT_ARM64=$(echo "$APP_NAME-linux-arm64-$APP_VERSION-LITE-$HASH.deb")" >> $GITHUB_ENV

- name: bundle arm64 linux
run: ./node_modules/.bin/gulp release-linux-deb-arm64 --out=../artifacts/arm64/$ARTIFACT_ARM64
run: ./node_modules/.bin/gulp release-linux-deb-arm64 --out=artifacts/arm64/$ARTIFACT_ARM64

- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
name: Upload arm64 artifacts
with:
name: ${{ env.ARTIFACT_ARM64 }}
path: ../artifacts/arm64/
path: artifacts/arm64/

# x64
- name: Set x64 MAX artifact name
Expand All @@ -239,13 +239,13 @@ jobs:
run: echo "ARTIFACT_X64=$(echo "$APP_NAME-linux-x64-$APP_VERSION-LITE-$HASH.deb")" >> $GITHUB_ENV

- name: bundle x64 linux
run: ./node_modules/.bin/gulp release-linux-deb --out=../artifacts/x64/$ARTIFACT_X64
run: ./node_modules/.bin/gulp release-linux-deb --out=artifacts/x64/$ARTIFACT_X64

- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
name: Upload x64 artifacts
with:
name: ${{ env.ARTIFACT_X64 }}
path: ../artifacts/x64/
path: artifacts/x64/

build-windows:
name: Build Windows
Expand Down Expand Up @@ -344,20 +344,20 @@ jobs:

- name: bundle x64 windows
run: |
echo "Generating executable ../artifacts/x64/${{ env.ARTIFACT_X64 }}"
./node_modules/.bin/gulp release-win64 --out=../artifacts/x64/${{ env.ARTIFACT_X64 }}
echo "Generating executable artifacts/x64/${{ env.ARTIFACT_X64 }}"
./node_modules/.bin/gulp release-win64 --out=artifacts/x64/${{ env.ARTIFACT_X64 }}
# - name: list directories
# run: |
# dir .
# dir ../
# dir ../artifacts

- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
name: Upload x64 artifacts
with:
name: ${{ env.ARTIFACT_X64 }}
path: ../artifacts/x64/
path: artifacts/x64/
# x32
- name: Set x32 MAX artifact name
run: echo "ARTIFACT_X32=$(echo "${{ env.APP_NAME }}-win-x32-${{ env.APP_VERSION }}-MAX-${{ env.HASH }}.exe")" >> $GITHUB_ENV
Expand All @@ -370,14 +370,14 @@ jobs:

- name: bundle x32 windows
run: |
echo "Generating executable ../artifacts/x32/${{ env.ARTIFACT_X32 }}"
./node_modules/.bin/gulp release-win32 --out=../artifacts/x32/${{ env.ARTIFACT_X32 }}
echo "Generating executable artifacts/x32/${{ env.ARTIFACT_X32 }}"
./node_modules/.bin/gulp release-win32 --out=artifacts/x32/${{ env.ARTIFACT_X32 }}
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
name: Upload x32 artifacts
with:
name: ${{ env.ARTIFACT_X32 }}
path: ../artifacts/x32/
path: artifacts/x32/

build-macos:
name: Build macOS
Expand Down Expand Up @@ -479,13 +479,13 @@ jobs:
run: echo "ARTIFACT_X64=$(echo "$APP_NAME-macos-x64-$APP_VERSION-LITE-$HASH.dmg")" >> $GITHUB_ENV

- name: bundle x64 macOS
run: ./node_modules/.bin/gulp release-macos --out=../artifacts/x64/$ARTIFACT_X64
run: ./node_modules/.bin/gulp release-macos --out=artifacts/x64/$ARTIFACT_X64

- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
name: Upload x64 artifacts
with:
name: ${{ env.ARTIFACT_X64 }}
path: ../artifacts/x64/
path: artifacts/x64/

# universal build
- name: Set universal MAX artifact name
Expand All @@ -496,13 +496,13 @@ jobs:
run: echo "ARTIFACT_UNIV=$(echo "$APP_NAME-macos-universal-$APP_VERSION-LITE-$HASH.dmg")" >> $GITHUB_ENV

- name: bundle universal macOS
run: ./node_modules/.bin/gulp release-macos-universal --out=../artifacts/universal/$ARTIFACT_UNIV
run: ./node_modules/.bin/gulp release-macos-universal --out=artifacts/universal/$ARTIFACT_UNIV

- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
name: Upload universal artifacts
with:
name: ${{ env.ARTIFACT_UNIV }}
path: ../artifacts/universal/
path: artifacts/universal/

notify:
name: Notify
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Changelog



## [v3.6.6](https://github.com/unfoldingWord/translationCore/tree/v3.6.6) (2024-09-18)

**Fixed bugs:**
- Getting latest resources from Door43-Catalog broken due to changes on DCS [\#7588](https://github.com/unfoldingWord/translationCore/issues/7588)


## [v3.6.5](https://github.com/unfoldingWord/translationCore/tree/v3.6.5) (2024-07-12)

**Fixed bugs:**
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"overwrite-resources": "rm -rf tcResources/en/bibles tcResources/en/translationHelps tcResources/el-x-koine tcResources/hi && npm run update-resources",
"update-apps": "git submodule foreach --recursive git checkout develop && git submodule foreach --recursive git pull",
"update-attributions": "node scripts/attributions/generateAttributionData.js src/js/components/home/license/attributionData.json",
"update-resources": "node scripts/resources/updateResources.js tcResources en hi el-x-koine hbo --allAlignedBibles --uWoriginalLanguage",
"update-resources": "node scripts/resources/updateResources.js tcResources en hi el-x-koine hbo --allAlignedBibles --uWoriginalLanguage --unfoldingWordOrg --preProd",
"update-version": "node ./scripts/versionScript.js"
},
"repository": {
Expand Down Expand Up @@ -186,7 +186,7 @@
"string-punctuation-tokenizer": "^2.2.0",
"sudo-prompt": "6.2.1",
"tc-electron-env": "0.10.0",
"tc-source-content-updater": "1.4.27",
"tc-source-content-updater": "1.4.29",
"tc-strings": "0.1.7",
"tc-tool": "4.1.0",
"tc-ui-toolkit": "6.2.9",
Expand Down
138 changes: 120 additions & 18 deletions scripts/latest/getLatestTcore.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,8 @@ def fetch_url(url):
response.raise_for_status()
return response.json()

def get_latest_release():
def get_latest_release(is_lite_install_):
latest_release_url = 'https://api.github.com/repos/unfoldingWord-dev/translationCore/releases/latest'
is_lite_install_ = True
installed_version = 'v0.0.0'

configs = {
Expand Down Expand Up @@ -159,23 +158,126 @@ def get_latest_release():

return {}

installers = get_latest_release()
def json_to_html_table(json_data):
html = '<table border="1">\n'
html += '<tr><th>Version</th><th>OS</th><th>Architecture</th><th>Link</th></tr>\n'

for version, os_data in json_data.items():
for os, arch_data in os_data.items():
for arch, link in arch_data.items():
html += f'<tr><td>{version}</td><td>{os}</td><td>{arch}</td><td><a href="{link}">Download</a></td></tr>\n'

html += '</table>'
return html

def getStr(key):
"""
Retrieve the value from keyToText if the key exists.
If the key does not exist, return the key as default value.
:param key: The key to look for.
:return: The value associated with the key, or key as the default value.
"""
keyToText = {
"macos": "MacOS",
"linux": "Linux",
"win": "Windows",
"x64": "x64",
"universal": "Universal",
"arm64": "ARM64",
"x32": "x86",
"lite": "Minimal Install",
"max": "Full Install"
}

return keyToText.get(key, key)

#####################################################
# Captured html from the web page:
"""
<p class="" style="white-space:pre-wrap;">
<strong>Full install</strong>
<br>
"Windows: "
<a href="https://github.com/unfoldingWord/translationCore/releases/download/v3.6.6/tC-win-x64-3.6.6-MAX-635b02f.exe" target="">x64</a>
|
<a href="https://github.com/unfoldingWord/translationCore/releases/download/v3.6.6/tC-win-x32-3.6.6-MAX-635b02f.exe" target="_blank">x86</a>
<br>
"MacOS: "
<a href="https://github.com/unfoldingWord/translationCore/releases/download/v3.6.6/tC-macos-x64-3.6.6-MAX-635b02f.dmg" target=""> x64</a>
|
<a href="https://github.com/unfoldingWord/translationCore/releases/download/v3.6.6/tC-macos-universal-3.6.6-MAX-635b02f.dmg" target="">Universal</a>
<br>
"Linux: "
<a href="https://github.com/unfoldingWord/translationCore/releases/download/v3.6.6/tC-linux-x64-3.6.6-MAX-635b02f.deb" target="">x64</a>
|
<a href="https://github.com/unfoldingWord/translationCore/releases/download/v3.6.4/tC-linux-arm64-3.6.4-MAX-ee24062.deb" target="">ARM64</a>
"""

def json_to_html(json_data, key):
html = f'\n<p class="" style="white-space:pre-wrap;">\n<strong>{getStr(key)}</strong>\n'

for os in ["win", "macos", "linux"]:
# for os, arch_data in json_data.items():
archs = []
arch_data = json_data.get(os, [])
html += f'<br>\n"{getStr(os)}: "\n'

for arch, link in arch_data.items():
line = f'<a href="{link}" target="_blank">{getStr(arch)}</a>\n'
archs.append(line)

html += '" | "\n'.join(archs)

html += '</p>\n'
return html

lite_installers = get_latest_release(True)
max_installers = get_latest_release(False)
installers = {
'lite': lite_installers,
'max': max_installers
}
json_data = json.dumps(installers, indent=4)
print(json_data)

html = json_to_html(max_installers, 'max')
print (html)

html = json_to_html(lite_installers, 'lite')
print (html)

#####################################################
# Output is in this format:
# {
# "macos": {
# "x64": "https://github.com/unfoldingWord/translationCore/releases/download/v3.6.0-LITE/tC-macos-x64-3.6.0-LITE-2bc4476.dmg",
# "universal": "https://github.com/unfoldingWord/translationCore/releases/download/v3.6.0-LITE/tC-macos-universal-3.6.0-LITE-2bc4476.dmg"
# },
# "linux": {
# "x64": "https://github.com/unfoldingWord/translationCore/releases/download/v3.6.0-LITE/tC-linux-x64-3.6.0-LITE-2bc4476.deb",
# "arm64": "https://github.com/unfoldingWord/translationCore/releases/download/v3.6.0-LITE/tC-linux-arm64-3.6.0-LITE-2bc4476.deb"
# },
# "win": {
# "x64": "https://github.com/unfoldingWord/translationCore/releases/download/v3.6.0-LITE/tC-win-x64-3.6.0-LITE-2bc4476.exe",
# "x32": "https://github.com/unfoldingWord/translationCore/releases/download/v3.6.0-LITE/tC-win-x32-3.6.0-LITE-2bc4476.exe"
# }
# }
# JSON Output is in this format:
"""
{
"lite": {
"macos": {
"x64": "https://github.com/unfoldingWord/translationCore/releases/download/v3.6.6-LITE/tC-macos-x64-3.6.6-LITE-635b02f.dmg",
"universal": "https://github.com/unfoldingWord/translationCore/releases/download/v3.6.6-LITE/tC-macos-universal-3.6.6-LITE-635b02f.dmg"
},
"linux": {
"x64": "https://github.com/unfoldingWord/translationCore/releases/download/v3.6.6-LITE/tC-linux-x64-3.6.6-LITE-635b02f.deb",
"arm64": "https://github.com/unfoldingWord/translationCore/releases/download/v3.6.6-LITE/tC-linux-arm64-3.6.6-LITE-635b02f.deb"
},
"win": {
"x64": "https://github.com/unfoldingWord/translationCore/releases/download/v3.6.6-LITE/tC-win-x64-3.6.6-LITE-635b02f.exe",
"x32": "https://github.com/unfoldingWord/translationCore/releases/download/v3.6.6-LITE/tC-win-x32-3.6.6-LITE-635b02f.exe"
}
},
"max": {
"macos": {
"x64": "https://github.com/unfoldingWord/translationCore/releases/download/v3.6.6/tC-macos-x64-3.6.6-MAX-635b02f.dmg",
"universal": "https://github.com/unfoldingWord/translationCore/releases/download/v3.6.6/tC-macos-universal-3.6.6-MAX-635b02f.dmg"
},
"linux": {
"x64": "https://github.com/unfoldingWord/translationCore/releases/download/v3.6.6/tC-linux-x64-3.6.6-MAX-635b02f.deb",
"arm64": "https://github.com/unfoldingWord/translationCore/releases/download/v3.6.6/tC-linux-arm64-3.6.6-MAX-635b02f.deb"
},
"win": {
"x64": "https://github.com/unfoldingWord/translationCore/releases/download/v3.6.6/tC-win-x64-3.6.6-MAX-635b02f.exe",
"x32": "https://github.com/unfoldingWord/translationCore/releases/download/v3.6.6/tC-win-x32-3.6.6-MAX-635b02f.exe"
}
}
}
"""
Loading

0 comments on commit 171828b

Please sign in to comment.