INNER CODE UNIT · JavaScript

getLatestStableTag

cloudposse/atmos · website/plugins/doc-release-data/index.js:82

function getLatestStableTag() {
  try {
    const tags = execSync('git tag --sort=-version:refname', {
      encoding: 'utf8',
      stdio: ['pipe', 'pipe', 'pipe'],
    })
      .trim()
      .split('\n')
      .filter(Boolean);

    return tags.find((t) => /^v\d+\.\d+\.\d+$/.test(t)) || null;
  } catch (e) {
    console.warn(`[doc-release-data] Failed to find the latest stable tag: ${e.message}`);
    return null;
  }
}

/**

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…