Skip to content

Commit

Permalink
chore(version-notification): update latest version management
Browse files Browse the repository at this point in the history
  • Loading branch information
Joxit committed Jul 17, 2023
1 parent 42bcec5 commit c74a9ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const getVersion = (version) => {
return version;
};

fs.writeFileSync('.version.json', JSON.stringify({ version: getVersion(version) }));
fs.writeFileSync('.version.json', JSON.stringify({ version: getVersion(version), latest: version }));

const plugins = [
riot(),
Expand Down
5 changes: 3 additions & 2 deletions src/components/docker-registry-ui.riot
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<material-navbar>
<span class="logo">
<span>Docker Registry UI</span>
<version-notification version="{ version }" on-notify="{ notifySnackbar }"></version-notification>
<version-notification version="{ latest }" on-notify="{ notifySnackbar }"></version-notification>
</span>
<div class="menu">
<search-bar on-search="{ onSearch }"></search-bar>
Expand Down Expand Up @@ -137,7 +137,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</material-footer>
</footer>
<script>
import { version } from '../../.version.json';
import { version, latest } from '../../.version.json';
import { Router, Route } from '@riotjs/route';
import Catalog from './catalog/catalog.riot';
import TagList from './tag-list/tag-list.riot';
Expand Down Expand Up @@ -260,6 +260,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
baseRoute: '([^#]*?)/(\\?[^#]*?)?(#!)?(/?)',
router,
version,
latest,
truthy,
stringToArray,
};
Expand Down

0 comments on commit c74a9ae

Please sign in to comment.