Git Product home page Git Product logo

Comments (8)

saghul avatar saghul commented on June 13, 2024

/cc @bnoordhuis @indutny @piscisaureus

from libuv-release-tool.

piscisaureus avatar piscisaureus commented on June 13, 2024

I made the 1.0.0-rc1 release manually since the tool wsn't ready, but at least I could capture what we need to address:

  • Major releases are not supported

As far as I can tell, major versions are supported. However the major version isn't bumped by the tool, but I think it's not that painful to do that (once) by hand.

Also note that the tool currently doesn't interpret x.y.z-rc versions, but we can change that.

  • The tool should check if the version is set to release

It's supposed to do that, doesn't it?

and verify if there is already a tag with that version

It does a couple of checks related to the tags that already exists, also whether there are no 'holes' in the list of tags. Did you find an issue with this?

  • Never bump the version, it now needs to be done manually, since minor or patch might change, depending on what actually changed

Whatever you want, of course, because you are the one that makes releases. But wouldn't it be easier if there were just a command line option (e.g. use --minor to bump the minor version instead of the patch)?

  • When uploading the git archive, we do it to a path like vX.Y.Z/xX.Y.Z.tar.gz, which gives an error becuas the directory is not there, maybe just put all tarballs in a single directory?

I don't really mind. We could also update to code to create the directory.

  • Swith to execSync now that it exists?

That will be in node 0.12 but we're still waiting for it to be released.
Unless we're going to make major changes to the release tool I don't think it's necessary.

  • Since we are here: sign tags and tarballs?

Sure - but how is this supposed to work? I have never signed a tarball. Is there a tool to sign tarballs? And where do we get a certificate?

My time / js knowledge are not plentiful, but can I offer moral support!

from libuv-release-tool.

piscisaureus avatar piscisaureus commented on June 13, 2024

Some code pointers:

  • Tag checks:
    git.exec(['tag', '-l', tagPrefix], function(err, data) {
    if (err)
    return error(err);
    var seenPatches = [];
    data.split(/\r?\n/).forEach(function(tag) {
    // Ignore impty lines
    if (tag === '')
    return;
    // Try to parse the tag name
    try {
    var version = ver.parse(tag);
    } catch (e) {
    return error(e);
    }
    // Ignore non-release tags
    if (!version.is_release)
    return;
    assert(!seenPatches[version.patch]);
    seenPatches[version.patch] = true;
    });
    /* Verify that all tags are linear. */
    for (var i = 0; i < seenPatches.length; i++) {
    if (!seenPatches[i])
    console.warn('Warning: no tag with patch level ' + i + ' found.');
    }
    /* Verify that the new patch fits in. */
    if (nextVersion && nextVersion.patch > seenPatches.length) {
    var msg = util.format('New tag has patch level %d, ' +
    'but no tag with patch level %d was found',
    nextVersion.patch,
    nextVersion.patch - 1)
    return error(new Error(msg));
    } else if (nextVersion && nextVersion.patch < seenPatches.length) {
    var msg = util.format('Tag for patch level %d already exists',
    nextVersion.patch);
    return error(new Error(msg));
    }
    cb && cb();
    });
  • Release check:
    if (!version.is_release)
    return abort("You probably don't want to release a pre-release " +
    "version");
  • Upload (and maybe in the future create the directory):
    var command = format('git archive %s --format=tar --prefix=%s | gzip -9 | ssh [email protected] "cat > %s"',
    tag,
    prefix,
    filename);
  • Parse the version:
    var match = /^v?(\d+)\.(\d+).(\d+)(-pre)?$/.exec(name);

from libuv-release-tool.

saghul avatar saghul commented on June 13, 2024

Thanks for the pointers Bert, I'll try to write some broken JavaScript.

About the version, there seems to be a undocumented optional command line option to specify the version: "--version", maybe we can make it required now.

from libuv-release-tool.

piscisaureus avatar piscisaureus commented on June 13, 2024

I think we just figured that the tool just works fine :)

from libuv-release-tool.

piscisaureus avatar piscisaureus commented on June 13, 2024

I also noticed that there is a step ("createWebsiteDirectory") that is supposed to do as the name suggests.

What are the errors you get when you try to release?

function createWebsiteDirectory() {
var tag = ver.format(state.releaseVersion);
var dir = '~/www/dist/' + tag;
child_process.execFile('ssh', ['[email protected]', 'mkdir -p ' + dir], { stdio: 'inherit' }, nextOrRetry);
}

from libuv-release-tool.

saghul avatar saghul commented on June 13, 2024

Oh! It failed to parse the version so I couldn't get further.

Also, add a "--dry-run" option to my wishlist :-)

from libuv-release-tool.

saghul avatar saghul commented on June 13, 2024

This landed already, last couple of releases were already made with the tool.

from libuv-release-tool.

Related Issues (5)

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.