Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: publish nightly builds #27

Closed
7 tasks done
dsebastien opened this issue Feb 25, 2018 · 4 comments
Closed
7 tasks done

build: publish nightly builds #27

dsebastien opened this issue Feb 25, 2018 · 4 comments
Labels

Comments

@dsebastien
Copy link
Contributor

dsebastien commented Feb 25, 2018

Integrate generation/publication of nightly builds.
How? npm script as we had in Stark "v1" ?
How does Angular create its nightly builds?

Publish nightly through Travis

pre-reqs:

  • needs NPM token to publish
  • should only publish to npm if
    • nightly build (should add the "next" tag)
    • slug = NationalBankBelgium/stark

steps:

  • release-publish.sh: check if TRAVIS_EVENT_TYPE == "cron". If so:
    • don't check for TRAVIS_TAG
    • publish with "next" tag
@dsebastien dsebastien added this to the 10.0.0-alpha milestone Feb 25, 2018
@dsebastien dsebastien added the comp: build-main Main build label Feb 28, 2018
@dsebastien dsebastien changed the title Publish nightly builds on npm build: publish nightly builds on npm Mar 1, 2018
@dsebastien dsebastien changed the title build: publish nightly builds on npm build: publish nightly builds Mar 2, 2018
@dsebastien dsebastien added P1 and removed P2 labels Mar 29, 2018
@dsebastien
Copy link
Contributor Author

We can leverage Travis CRON jobs:

@dsebastien
Copy link
Contributor Author

Old nightly build script just in case:

"use strict";

const helpers = require("./helpers");
const fs = require('fs');
const packageJSONPath = helpers.root("/package.json");

console.log("Preparation of the package.json for the nighly build...");

var packageJSON = require(packageJSONPath);
packageJSON["version"] = getNightlyVersionString(packageJSON["version"]);
fs.writeFileSync(packageJSONPath, JSON.stringify(packageJSON));

// Code from https://github.com/Microsoft/TypeScript/blob/master/scripts/configureNightly.ts
function getNightlyVersionString(versionString) {
	// If the version string already contains "-dev",
	// then get the base string and update based on that.
	const dashNightlyPos = versionString.indexOf("-dev");
	if (dashNightlyPos >= 0) {
		versionString = versionString.slice(0, dashNightlyPos);
	}

	// We're going to append a representation of the current time at the end of the current version.
	// String.prototype.toISOString() returns a 24-character string formatted as 'YYYY-MM-DDTHH:mm:ss.sssZ',
	// but we'd prefer to just remove separators and limit ourselves to YYYYMMDD.
	// UTC time will always be implicit here.
	const now = new Date();
	const timeStr = now.toISOString().replace(/:|T|\.|-/g, "").slice(0, 8);

	return `${versionString}-dev.${timeStr}`;
}

@dsebastien
Copy link
Contributor Author

blocked by #54

@dsebastien
Copy link
Contributor Author

PR: #327

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant