Git Product home page Git Product logo

Comments (1)

danyshaanan avatar danyshaanan commented on July 20, 2024

👍

This line:

git --no-pager log --format='git checkout %H && git tag %s' -G '"version":' package.json

Will identify commits that changed the version in package.json, and output this:

git checkout a454baa05765163667ec89e2d8657a36f78998c7 && git tag 1.0.9
git checkout 1d8c6cada9eda7c0eb03735dd5d0505d2d831a97 && git tag 1.0.8
git checkout 121b599b8dbfc9594ca5cc94994647e02bfe0dab && git tag 1.0.7
git checkout 1f6c2fe25e2d496f6c1f04ab2f4f43887ab7316e && git tag 1.0.6
git checkout 22fecdd67bdc36b0b7862ceb1876e0967b21d1a0 && git tag 1.0.5
git checkout 12b09973daf1f3015fd0a03b192417936c58d2a0 && git tag 1.0.4
git checkout f79e5899bca0a1207368d75eaa303af067917e81 && git tag 1.0.3
git checkout 41ed066f4258d6e8dac9680a84d5eead4f944698 && git tag 1.0.2
git checkout 4967ee96a56f6a3537a79755dea506877d556d88 && git tag changed name
git checkout 3019fa3be046ddd18f0ab490e2866e72b15be961 && git tag kinda working, still bad ui

Fixing the last two lines with 1.0.1 and 1.0.0 will let you easily add the missing tags.
Then just push them with:

git push --tag

Also, npm info how2 will show that...:

{ name: 'how2',
  description: 'Uses Google and Stackoverflow to find how to do things on a Unix commmand line',
  'dist-tags': { latest: '1.0.9' },
  versions:
   [ '1.0.0',
     '1.0.1',
     '1.0.2',
     '1.0.4',
     '1.0.5',
     '1.0.7',
     '1.0.8',
     '1.0.9' ]
  // more fields...
}

...this cover all releases.

(All of this assumes that the package was always released right after the package.json version change...)

from how2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.