diff --git a/updater/main.go b/updater/main.go index 2a093b4..c5ab98f 100644 --- a/updater/main.go +++ b/updater/main.go @@ -15,9 +15,8 @@ import ( ) const ( - linksFile = "links.yml" // social media - releaseFile = "releases.yml" // release notes - commonFile = "common.json" // endonyms & shared links + linksFile = "links.yml" // social media + commonFile = "common.json" // endonyms & shared links templateSuffix = ".tmpl" templateDir = "templates" translationsDir = "translations" @@ -30,10 +29,12 @@ var ( debug = false ) -type site map[string]string // an entry for each language -type sites map[string]site // e.g. links.yml -type translations map[string]string // e.g. en.json -type releases []map[string][]string // e.g. releases.yml +type ( + site map[string]string // an entry for each language + sites map[string]site // e.g. links.yml + translations map[string]string // e.g. en.json + releases []map[string][]string // e.g. releases.yml +) // downloads page type page struct { @@ -123,7 +124,7 @@ func makeMinifiedCopy(filepath string) error { bareName := strings.Replace(filepath, extension, "", -1) minifiedPath := fmt.Sprintf("%s.min%s", bareName, extension) - err = os.WriteFile(minifiedPath, []byte(minified), 0644) + err = os.WriteFile(minifiedPath, []byte(minified), 0o644) if err != nil { return fmt.Errorf("unable to write minified data: %w", err) } @@ -193,15 +194,6 @@ func loadInfo(translationFile string) (page, error) { fmt.Printf("sites:\n%v\n\n", sites) } - var releases releases - err = readUnmarshalFile(releaseFile, &releases) - if err != nil { - return page{}, fmt.Errorf("unable to load releases: %w", err) - } - if debug { - fmt.Printf("releases:\n%v\n", releases) - } - // not language specific var common translations err = readUnmarshalFile(commonPath, &common) @@ -227,7 +219,6 @@ func loadInfo(translationFile string) (page, error) { Sites: sites, Common: common, Translations: translations, - Releases: releases, } if debug { fmt.Printf("page: %+v\n", page) diff --git a/updater/releases.yml b/updater/releases.yml deleted file mode 100644 index d60b368..0000000 --- a/updater/releases.yml +++ /dev/null @@ -1,159 +0,0 @@ -# This list is ordered by version, newest at the top. -# Remove any old versions from the bottom of the list, -# or comment them out by adding a `#` prefix to each line. -# -# Add new version notes as they're available, following -# the release notes process in the CS repo. -# -# The README files on this repo's profile directory are -# updated automatically after changes to this file are -# committed to the "main" branch. - -- 8.3.7 (preview): - - Fixed an issue preventing some users from sending issue reports from the application - - Fixed an issue that prevented 25-digit activation codes from being redeemed - -- 8.3.5: - - Front end and UI optimization - - Fixed payment issue with Google Play Store - - Updated circumvention protocols - -- 8.3.4: - - Updated dialer protocols - - Payment page bug fixes - -- 8.3.3: - - Updated proxy routes - - Web traffic optimization - -- 8.3.2: - - Updated circumvention protocols - -- 8.3.1: - - Updated circumvention protocols - -- 8.3.0: - - Updated circumvention protocols - - Web traffic optimization - -#- 8.2.9: - # - Crashing bug fixes - # - UI Optimizations - -#- 8.2.8: - # - macOS bug fixes - # - Windows bug fixes - -#- 8.2.6: - #- Crashing bug fix for macOS installer - -#- 8.2.5: - #- Updated circumvention protocols - # - New proxy configurations - -#- 8.2.4: - #- Updated circumvention protocols - # - Bug fixes - -#- 8.2.1: - #- UI Fixes - #- Updated circumvention protocols - -#- 8.1.14: -# - Updated translations -# - Improvements to circumvention architecture - -#- 8.1.13: -# - Fix issues linking device via email on desktop (macOS) -# - Bug fixes -# - Performance improvements - -#- 8.1.12: -# - Fix issues linking device via email on desktop -# - Bug fixes - -# - 7.9.9: -# - Localization bug fixes -# - Updated circumvention protocols and improved proxy selection -# - Dektop system tray UI/UX updates -# - Bug fixes for app crashes - -# - 7.9.8: -# - iOS username and password support -# - Desktop username and password support -# - Bug fixes -# - Reduced file size on Android - -# - 7.9.7: -# - Updated circumvention protocols -# - Spanish language update for Cuban users -# - Bug fixes for desktop device authorization - -# - 7.9.6: -# - Windows, macOS, and Linux UI/UX updates -# - Updated proxy selection protocols -# - Bug fixes - -# - 7.9.5: -# - Translation and localization updates -# - Android crashing bug fixes - -# - 7.9.4: -# - Updated circumvention protocols -# - Desktop bug fixes - -# - 7.9.3: -# - improvements to notifications -# - improve circumvention protocols -# - fixed bugs for Linux and MacOS -# - fixes to Desktop UI -# - updated translations -# - various bug fixes for Android -# - add device link confirmation to UI - -# - 7.9.1: -# - add desktop bandwidth widget -# - add iOS username and password device linking - -# - 7.9.0: -# - update circumvention protocols -# - improvements to websockets -# - reduce client size - -# - 7.8.8: -# - fixed bug with Spanish translations not displaying -# - updated circumvention library - -# - 7.8.7: -# - update UI elements -# - fixed bug with translations in UI -# - updated circumvention library - -# - 7.8.6: -# - updated circumvention library -# - update translations support - -#- 7.8.5: -# - fixed bug for pro plans selection - -#- 7.8.4: -# - minor optimizations and bug fixes - -# - 7.8.3: -# - fixed bug with configuration that caused some clients to crash -# - fixed bug with language selection - -# - 7.8.2: -# - optimized startup -# - fixed database bug - -# - 7.8.1: -# - improved proxy selection - -# - 7.8.0: -# - implemented advanced automatic proxy selection -# - added new protocols - -# - 7.7.2: -# - added new protocols -# - bug fixes diff --git a/updater/templates/README.md.tmpl b/updater/templates/README.md.tmpl index 18bf926..8ab0494 100644 --- a/updater/templates/README.md.tmpl +++ b/updater/templates/README.md.tmpl @@ -103,12 +103,5 @@ {{- end }} ## Release Notes -{{- range $release := $rl }} -{{- range $version, $notes := $release }} -### {{ $version }} -{{- range $note := $notes }} -- {{ $note }} -{{- end }} -{{- end }} -{{- end }} +- {{ $cm.releases_link }} diff --git a/updater/translations/common.json b/updater/translations/common.json index 40f6d9a..b94726d 100644 --- a/updater/translations/common.json +++ b/updater/translations/common.json @@ -13,25 +13,26 @@ "website_link_alt": "https://www.mror.network/", "faq_link": "https://lantern.io/faq", "repo_base_link": "https://github.com/getlantern/.github/blob/main", + "releases_link": "https://github.com/getlantern/lantern/releases", "win10_link_gl": "https://gitlab.com/getlantern/lantern-binaries-mirror/-/raw/master/lantern-installer.exe", "win10_link_gh": "https://github.com/getlantern/lantern-binaries/raw/main/lantern-installer.exe", - "win10_link_s3": "https://s3.amazonaws.com/lantern/lantern-installer.exe", + "win10_link_s3": "https://s3.amazonaws.com/lantern.io/releases/production/latest/lantern-installer.exe", "win10_link_beta": "https://github.com/getlantern/lantern-binaries/raw/main/lantern-installer-preview.exe", "win7_link_gh": "https://github.com/getlantern/lantern-binaries/raw/main/lantern-installer-win7.exe", "android_link_gl": "https://gitlab.com/getlantern/lantern-binaries-mirror/-/raw/master/lantern-installer.apk", "android_link_gh": "https://github.com/getlantern/lantern-binaries/raw/main/lantern-installer.apk", - "android_link_s3": "https://s3.amazonaws.com/lantern/lantern-installer.apk", + "android_link_s3": "https://s3.amazonaws.com/lantern.io/releases/production/latest/lantern-installer.apk", "android_link_beta": "https://github.com/getlantern/lantern-binaries/raw/main/lantern-installer-preview.apk", "android_link_play": "https://play.google.com/store/apps/details?id=org.getlantern.lantern", "osx_link_gl": "https://gitlab.com/getlantern/lantern-binaries-mirror/-/raw/master/lantern-installer.dmg", "osx_link_gh": "https://github.com/getlantern/lantern-binaries/raw/main/lantern-installer.dmg", - "osx_link_s3": "https://s3.amazonaws.com/lantern/lantern-installer.dmg", + "osx_link_s3": "https://s3.amazonaws.com/lantern.io/releases/production/latest/lantern-installer.dmg", "osx_link_beta": "https://github.com/getlantern/lantern-binaries/raw/main/lantern-installer-preview.dmg", "ios_link": "https://apps.apple.com/app/id1457872372?l", "ubuntu32_link_gh": "https://github.com/getlantern/lantern-binaries/raw/main/lantern-installer-32-bit.deb", - "ubuntu32_link_s3": "https://s3.amazonaws.com/lantern/lantern-installer-32-bit.deb", + "ubuntu32_link_s3": "https://s3.amazonaws.com/lantern.io/releases/production/latest/lantern-installer.deb", "ubuntu64_link_gh": "https://github.com/getlantern/lantern-binaries/raw/main/lantern-installer-64-bit.deb", - "ubuntu64_link_s3": "https://s3.amazonaws.com/lantern/lantern-installer-64-bit.deb", + "ubuntu64_link_s3": "https://s3.amazonaws.com/lantern.io/releases/production/latest/lantern-installer.deb", "ubuntu32_link_beta": "https://github.com/getlantern/lantern-binaries/raw/main/lantern-installer-preview-32-bit.deb", "ubuntu64_link_beta": "https://github.com/getlantern/lantern-binaries/raw/main/lantern-installer-preview-64-bit.deb" }