001/*
002 * Copyright (c) 2012-2017 Institut National des Sciences Appliquées de Lyon (INSA-Lyon)
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the Eclipse Public License v1.0
006 * which accompanies this distribution, and is available at
007 * http://www.eclipse.org/legal/epl-v10.html
008 */
009
010package org.eclipse.golo.cli.command;
011
012import java.io.IOException;
013import java.io.InputStream;
014import java.util.Properties;
015
016public final class Metadata {
017
018  private Metadata() {
019    // purely static class
020  }
021
022  public static final String VERSION;
023  public static final String TIMESTAMP;
024  public static final String GUIDE_BASE;
025
026  static {
027    Properties props = new Properties();
028    try (InputStream inputStream = Metadata.class.getResourceAsStream("/metadata.properties")) {
029      props.load(inputStream);
030      VERSION = props.getProperty("version");
031      TIMESTAMP = props.getProperty("timestamp");
032      GUIDE_BASE = props.getProperty("guide-url");
033    } catch (IOException e) {
034      throw new AssertionError("Could not load metadata.properties from the current classpath.");
035    }
036  }
037}