diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index be4a900..697ed1d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,11 +22,12 @@ jobs: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - # Runs a single command using the runners shell - - name: Run a one-line script - run: echo `date` > .opus_version + - name: Create version file + run: | + echo `date` > .opus_version + git log -8 --pretty=format:'%s (%cr)' >> .opus_version - - name: Update version file + - name: Commit version file uses: alexesprit/action-update-file@master with: branch: 'develop-1.8' diff --git a/sys/apps/Version.lua b/sys/apps/Version.lua index 55d196e..3d83ac4 100644 --- a/sys/apps/Version.lua +++ b/sys/apps/Version.lua @@ -9,22 +9,28 @@ if not config.current then end UI:setPage(UI.Page { + UI.Text { + x = 2, y = 2, ex = -2, + align = 'center', + value = 'Opus has been updated.', + textColor = 'yellow', + }, UI.TextArea { - x = 2, y = 2, ey = -2, - value = 'A new version of Opus is available.' + x = 2, y = 4, ey = -8, + text = config.details, }, UI.Button { - x = 2, y = 5, width = 21, + x = 2, y = -6, width = 21, event = 'skip', text = 'Skip this version', }, UI.Button { - x = 2, y = 7, width = 21, + x = 2, y = -4, width = 21, event = 'remind', text = 'Remind me tomorrow', }, UI.Button { - x = 2, y = 9, width = 21, + x = 2, y = -2, width = 21, event = 'update', text = 'Update' }, diff --git a/sys/autorun/version.lua b/sys/autorun/version.lua index 304fe0d..ef3d5a6 100644 --- a/sys/autorun/version.lua +++ b/sys/autorun/version.lua @@ -36,9 +36,11 @@ if fs.exists('.opus_version') then pcall(function() local c = Util.httpGet(string.format(URL, _G.OPUS_BRANCH)) if c then - c = Util.split(c)[1] - if config.opus ~= c and config.skip ~= c then - config.current = c + local lines = Util.split(c) + local revdate = table.remove(lines, 1) + if config.opus ~= revdate and config.skip ~= revdate then + config.current = revdate + config.details = table.concat(lines, '\n') Config.update('version', config) print('New version available') if _ENV.multishell then