Skip to content

Commit

Permalink
Prepare for 2.1 release, and update tooling (#1497)
Browse files Browse the repository at this point in the history
* feat(monorepo): update release tooling, to aid migration to automated releases
* chore(monorepo): update version numbers in packages to prep release
* fix(Actions): add package.json to aid ESM
* fix(monorepo): update autoversion to ESM
* fix(monorepo): update workflow to cater for different versions
* fix(workflow) install _correct_ versions twice
* path(workflow) temporary disable create-newapp-check
  • Loading branch information
SanderElias authored Dec 22, 2021
1 parent dc6c595 commit 4e38b4f
Show file tree
Hide file tree
Showing 29 changed files with 382 additions and 226 deletions.
68 changes: 45 additions & 23 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,26 +301,48 @@ jobs:
# Optional: Skip internal call to `git fetch`
skip_fetch: true

testnewApp:
name: Test if we can create a new app
needs: npm_publish
runs-on: ubuntu-latest
strategy:
matrix:
prop: [{ node: 14, angular: 12 }]
steps:
- name: Setup angular project and run all tests
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.prop.node }}
env:
CI: true
- run: export NG_CLI_ANALYTICS=false false
- run: npm i @angular/cli@${{ matrix.prop.angular }} @scullyio/scully@develop @scullyio/ng-lib@develop --force
- run: npx ng new demo --skipGit --routing --style css --minimal --strict
- run: cd demo && npx ng g m home --route home --module app.module
- run: cd demo && npx ng g m about --route about --module app.module
- run: cd demo && npx ng add @scullyio/init@develop --renderer puppeteer --skip-confirmation
- run: cd demo && npx ng g @scullyio/init:blog
- run: cd demo && npx ng build
- run: cd demo && npx scully --noPrompt

# temporary disabled, we need to fix the schematics first, I'm checking this manually for now.
# testnewApp:
# name: Test if we can create a new app
# needs: npm_publish
# runs-on: ubuntu-latest
# strategy:
# matrix:
# prop: [
# { node: 14, angular: 12 },
# { node: 14, angular: 13 },
# { node: 16, angular: 12 },
# { node: 16, angular: 13 }
# ]
# steps:
# - name: Setup angular project and run all tests
# uses: actions/setup-node@v2
# with:
# node-version: ${{ matrix.prop.node }}
# env:
# CI: true
# NG_CLI_ANALYTICS: false false
# npm_config_legacy_peer_dependencies: true
# npm_config_legacy_peer_deps: true
# npm_config_force: true
# - run: |
# npx @angular/cli@${{ matrix.prop.angular }} new demo --skip-git --routing --style css --minimal --strict
# cd demo
# npx ng update @angular/cli --migrate-only --from 12.0.0 --to 12.0.1
# npx ng g m home --route home --module app.module
# npx ng g m about --route about --module app.module
# echo installing updated Rx and dev scully libs
# npm i rxjs@7 --legacy-peer-deps --force
# npm i @scullyio/scully@develop @scullyio/ng-lib@develop @scullyio/scully-plugin-puppeteer@develop puppeteer@latest --legacy-peer-deps --force
# echo Running scully add schematics
# npx ng add @scullyio/init@develop --renderer puppeteer --skip-confirmation
# echo update packages to @develop versions
# npm i @scullyio/scully@develop @scullyio/ng-lib@develop @scullyio/scully-plugin-puppeteer@develop puppeteer@latest --legacy-peer-deps --force
# echo add blog
# npx ng g @scullyio/init:blog
# echo build app
# npx ng build
# echo run Scully
# npx scully --noPrompt

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,5 @@ testDocs
scully/tsconfig.sps-sample.json
adsample.js
bs.sh
consoleProxy.ts
consoleProxy.ts
.angular
4 changes: 2 additions & 2 deletions libs/ng-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/ng-lib",
"version": "2.0.2",
"version": "2.1.0",
"repository": {
"type": "GIT",
"url": "https://github.com/scullyio/scully/tree/main/libs/ng-lib"
Expand All @@ -21,4 +21,4 @@
"scully-plugin",
"plugin"
]
}
}
4 changes: 2 additions & 2 deletions libs/platform-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/platform-server",
"version": "0.0.1",
"version": "2.1.0",
"peerDependencies": {
"@angular/common": ">12.2.0",
"@angular/core": ">12.2.0",
Expand All @@ -10,4 +10,4 @@
"dependencies": {
"tslib": "^2.3.0"
}
}
}
2 changes: 1 addition & 1 deletion libs/plugins/base-href-rewrite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/scully-plugin-base-href-rewrite",
"version": "2.0.1",
"version": "2.1.0",
"main": "./src/index.js",
"author": "Sander Elias",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion libs/plugins/docs-link-update/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/scully-plugin-docs-link-update",
"version": "2.0.1",
"version": "2.1.0",
"peerDependencies": {
"@scullyio/scully": "*"
},
Expand Down
4 changes: 2 additions & 2 deletions libs/plugins/extra/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/scully-plugin-extra",
"version": "2.0.1",
"version": "2.1.0",
"description": "Scully extra demo plugin",
"main": "./src/index.js",
"scripts": {},
Expand All @@ -21,4 +21,4 @@
"scully-plugin",
"plugin"
]
}
}
2 changes: 1 addition & 1 deletion libs/plugins/from-data/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/scully-plugin-from-data",
"version": "2.0.1",
"version": "2.1.0",
"description": "Scully demo data plugin",
"main": "./src/index.js",
"author": "",
Expand Down
2 changes: 1 addition & 1 deletion libs/plugins/google-analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/scully-plugin-google-analytics",
"version": "2.0.1",
"version": "2.1.0",
"author": "Israel Guzman",
"repository": {
"type": "GIT",
Expand Down
2 changes: 1 addition & 1 deletion libs/plugins/logrocket/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/scully-plugin-logrocket",
"version": "2.0.1",
"version": "2.1.0",
"repository": {
"type": "GIT",
"url": "https://github.com/scullyio/scully/tree/main/libs/plugins/logrocket"
Expand Down
2 changes: 1 addition & 1 deletion libs/plugins/scully-plugin-copy-to-clipboard/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/scully-plugin-copy-to-clipboard",
"version": "1.0.1",
"version": "2.1.0",
"author": "Ankit Prajapati",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion libs/plugins/scully-plugin-critical-css/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/scully-plugin-critical-css",
"version": "1.0.1",
"version": "2.1.0",
"peerDependencies": {
"@scullyio/scully": "*"
},
Expand Down
2 changes: 1 addition & 1 deletion libs/plugins/scully-plugin-flash-prevention/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/scully-plugin-flash-prevention",
"version": "2.0.1",
"version": "2.1.0",
"main": "./index.js",
"contributors": [
"Aaron Frost <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion libs/plugins/scully-plugin-local-cache/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/scully-plugin-local-cache",
"version": "2.0.1",
"version": "2.1.0",
"dependencies": {
"level": "*"
},
Expand Down
2 changes: 1 addition & 1 deletion libs/plugins/scully-plugin-playwright/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/scully-plugin-playwright",
"version": "0.0.2",
"version": "2.1.0",
"repository": {
"type": "GIT",
"url": "https://github.com/scullyio/scully/tree/main/libs/plugins/scully-plugin-playwright"
Expand Down
2 changes: 1 addition & 1 deletion libs/plugins/scully-plugin-puppeteer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/scully-plugin-puppeteer",
"version": "2.0.1",
"version": "2.1.0",
"description": "Scully Puppeteer render plugin",
"main": "./src/index.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion libs/plugins/scully-plugin-remove-scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@scullyio/scully-plugin-remove-scripts",
"description": "Scully plugin to remove scripts",
"version": "2.0.1",
"version": "2.1.0",
"main": "./src/index.js",
"author": "@herodevs",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion libs/plugins/sentry/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/scully-plugin-sentry",
"version": "2.0.1",
"version": "2.1.0",
"repository": {
"type": "GIT",
"url": "https://github.com/scullyio/scully/tree/main/libs/plugins/sentry"
Expand Down
2 changes: 1 addition & 1 deletion libs/scully-schematics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/init",
"version": "2.0.5",
"version": "2.1.0",
"description": "Add scully to your angular app",
"repository": {
"type": "GIT",
Expand Down
2 changes: 1 addition & 1 deletion libs/scully/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scullyio/scully",
"version": "2.0.3",
"version": "2.1.0",
"description": "Scully CLI",
"repository": {
"type": "GIT",
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scullyio",
"version": "2.0.0",
"version": "2.1.0",
"license": "MIT",
"url": "",
"repository": {
Expand Down Expand Up @@ -69,8 +69,9 @@
"fullPublish": "nx workspace-schematic publish",
"full-build": "npm i && npm run symlinks && npm run build:code && npm run build:sample && npm run build:docs && npm run jest:test && npm run cypress:e2e:server",
"workspace-generator": "nx workspace-generator",
"auto-publish-nightly": "tsc -p tools/tsconfig.tools.json && node dist/tools/autoVersion",
"release:npm": "tsc -p tools/tsconfig.tools.json && node dist/tools/deployReleasets.js",
"auto-publish-nightly": "tsc -p tools/tsconfig.tools.json && cp tools/package.json dist/tools/. && node dist/tools/autoVersion",
"prepRelease": "tsc -p tools/tsconfig.tools.json && cp tools/package.json dist/tools/. && node dist/tools/tagRelease.js",
"doPublish": "tsc -p tools/tsconfig.tools.json && cp tools/package.json dist/tools/. && node dist/tools/publishCurrent.js",
"prepare": "husky install"
},
"private": true,
Expand Down
10 changes: 7 additions & 3 deletions tools/autoVersion.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { readFileSync, writeFileSync } from 'fs';
import { join } from 'path';
import { publishPackage } from './publishPackage';
import { folder, getPublishableProjects, readJson, ReleaseData } from './utils';
import { publishPackage } from './publishPackage.js';
import { folder, getPublishableProjects, readJson, ReleaseData } from './utils.js';

(async (): Promise<void> => {
const currentVersions = await getPublishableProjects();
Expand Down Expand Up @@ -45,7 +45,11 @@ import { folder, getPublishableProjects, readJson, ReleaseData } from './utils';
const original = (readFileSync(pkgPath) as unknown) as string;
const pkg = JSON.parse(original);
const tag = 'develop';
const timeStamp = new Date().toTimeString().split(' ')[0].replace(/\:/g, '');
const timeStamp = new Date()
.toISOString()
.split('')
.filter((t: any) => !isNaN(t))
.join('');

pkg.version = `${toRelease.version}-BETA.${timeStamp}`;
// write a temporary package with the has attached to the version to relase a 'nighly'
Expand Down
94 changes: 0 additions & 94 deletions tools/deployReleasets.ts

This file was deleted.

Loading

0 comments on commit 4e38b4f

Please sign in to comment.