mirror of
https://github.com/scratchfoundation/scratch-link.git
synced 2025-07-04 09:40:35 -04:00
commit
11bd713b9c
8 changed files with 8249 additions and 41 deletions
|
@ -1,24 +1,61 @@
|
||||||
version: 2.1
|
version: 2.1
|
||||||
|
orbs:
|
||||||
|
node: circleci/node@5.1.0
|
||||||
alias_anchors: # anchors must be defined in YAML before being used by an alias
|
alias_anchors: # anchors must be defined in YAML before being used by an alias
|
||||||
- &should_sign
|
- &should-sign
|
||||||
or:
|
or:
|
||||||
- equal: [ develop, << pipeline.git.branch >> ]
|
- equal: [ develop, << pipeline.git.branch >> ]
|
||||||
- equal: [ main, << pipeline.git.branch >> ]
|
- equal: [ main, << pipeline.git.branch >> ]
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
build:
|
version-build-release:
|
||||||
jobs:
|
jobs:
|
||||||
|
- semver
|
||||||
- build-mac:
|
- build-mac:
|
||||||
context: scratch-desktop-and-link
|
context: scratch-desktop-and-link
|
||||||
|
requires:
|
||||||
|
- semver
|
||||||
|
- release:
|
||||||
|
requires:
|
||||||
|
- build-mac
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- develop
|
||||||
|
- main
|
||||||
jobs:
|
jobs:
|
||||||
|
semver:
|
||||||
|
executor: node/default
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- node/install # will use .nvmrc
|
||||||
|
- node/install-packages
|
||||||
|
- make-semantic-release-remote
|
||||||
|
# In release branches, this will calculate the version and save that to package.json so the build can use it.
|
||||||
|
# In other branches, it'll just check the semantic-release config.
|
||||||
|
# Note that if semantic-release makes changes it will automatically push them.
|
||||||
|
# That's the whole reason for the weird "local remote" stuff.
|
||||||
|
# See also: https://github.com/semantic-release/semantic-release/issues/964
|
||||||
|
- run: npx --no -- semantic-release
|
||||||
|
- persist-semantic-release-remote
|
||||||
|
release:
|
||||||
|
executor: node/default
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- node/install # will use .nvmrc
|
||||||
|
- checkout-semantic-release-remote
|
||||||
|
- run:
|
||||||
|
name: Pushing semantic-release changes for real
|
||||||
|
command: |
|
||||||
|
git push --tags origin << pipeline.git.branch >>
|
||||||
|
git push origin 'refs/notes/*' # semantic-release tracks channels with notes
|
||||||
build-mac:
|
build-mac:
|
||||||
macos:
|
macos:
|
||||||
xcode: 14.2 # warning MM0079: The recommended Xcode version for Xamarin.Mac 9.0.0 is Xcode 14.1 or later.
|
xcode: 14.2 # warning MM0079: The recommended Xcode version for Xamarin.Mac 9.0.0 is Xcode 14.1 or later.
|
||||||
environment:
|
environment:
|
||||||
HOMEBREW_NO_AUTO_UPDATE: 1 # save some time
|
HOMEBREW_NO_AUTO_UPDATE: 1 # save some time
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout-semantic-release-remote
|
||||||
- run:
|
- run:
|
||||||
name: Build Safari helper
|
name: Build Safari helper
|
||||||
command: |
|
command: |
|
||||||
|
@ -37,15 +74,13 @@ jobs:
|
||||||
paths: # Caching an archive instead of loose files works around CircleCI's issues with extracting links and permissions on macOS
|
paths: # Caching an archive instead of loose files works around CircleCI's issues with extracting links and permissions on macOS
|
||||||
- /tmp/visual-studio-mac.tar.gz
|
- /tmp/visual-studio-mac.tar.gz
|
||||||
- unless:
|
- unless:
|
||||||
condition:
|
condition: *should-sign
|
||||||
*should_sign
|
|
||||||
steps:
|
steps:
|
||||||
- do_mac_build:
|
- do_mac_build:
|
||||||
configuration: Debug
|
configuration: Debug
|
||||||
artifact_tag: Debug
|
artifact_tag: Debug
|
||||||
- when:
|
- when:
|
||||||
condition:
|
condition: *should-sign
|
||||||
*should_sign
|
|
||||||
steps:
|
steps:
|
||||||
- add_ssh_keys
|
- add_ssh_keys
|
||||||
- run:
|
- run:
|
||||||
|
@ -68,6 +103,30 @@ jobs:
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: Artifacts/
|
path: Artifacts/
|
||||||
commands:
|
commands:
|
||||||
|
make-semantic-release-remote:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
name: Make local 'remote' for semantic-release
|
||||||
|
command: |
|
||||||
|
git fetch origin 'refs/notes/*:refs/notes/*' # semantic-release tracks channels with notes
|
||||||
|
git clone . --bare --mirror semantic-release-remote # mirror copies notes
|
||||||
|
git remote set-url origin "file://$(realpath semantic-release-remote)" # semantic-release needs a proper URL
|
||||||
|
persist-semantic-release-remote:
|
||||||
|
steps:
|
||||||
|
- persist_to_workspace:
|
||||||
|
root: .
|
||||||
|
paths: semantic-release-remote
|
||||||
|
checkout-semantic-release-remote:
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- attach_workspace:
|
||||||
|
at: .
|
||||||
|
- run:
|
||||||
|
name: Pull semantic-release changes from local 'remote'
|
||||||
|
command: |
|
||||||
|
git remote add semantic-release semantic-release-remote
|
||||||
|
git pull --tags semantic-release << pipeline.git.branch >>
|
||||||
|
git fetch semantic-release 'refs/notes/*:refs/notes/*' # semantic-release tracks channels with notes
|
||||||
do_mac_build:
|
do_mac_build:
|
||||||
parameters:
|
parameters:
|
||||||
configuration:
|
configuration:
|
||||||
|
|
1
.husky/.gitattributes
vendored
Normal file
1
.husky/.gitattributes
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
* text eol=lf
|
4
.husky/commit-msg
Executable file
4
.husky/commit-msg
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
. "$(dirname -- "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npx --no-install commitlint --edit "$1"
|
4
commitlint.config.js
Normal file
4
commitlint.config.js
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
module.exports = {
|
||||||
|
extends: ['@commitlint/config-conventional'],
|
||||||
|
ignores: [message => message.startsWith('chore(release):')]
|
||||||
|
};
|
8153
package-lock.json
generated
8153
package-lock.json
generated
File diff suppressed because it is too large
Load diff
19
package.json
19
package.json
|
@ -4,7 +4,24 @@
|
||||||
"description": "Scratch Link is not published as an NPM package. This file only exists to facilitate installation of devDependencies.",
|
"description": "Scratch Link is not published as an NPM package. This file only exists to facilitate installation of devDependencies.",
|
||||||
"author": "Scratch Foundation",
|
"author": "Scratch Foundation",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
|
"scripts": {
|
||||||
|
"prepare": "husky install"
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"commitizen": {
|
||||||
|
"path": "cz-conventional-changelog"
|
||||||
|
}
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"scratch-vm": "1.5.27"
|
"@commitlint/cli": "17.5.1",
|
||||||
|
"@commitlint/config-conventional": "17.4.4",
|
||||||
|
"@semantic-release/changelog": "6.0.3",
|
||||||
|
"@semantic-release/commit-analyzer": "9.0.2",
|
||||||
|
"@semantic-release/git": "10.0.1",
|
||||||
|
"@semantic-release/npm": "10.0.2",
|
||||||
|
"@semantic-release/release-notes-generator": "10.0.3",
|
||||||
|
"husky": "8.0.3",
|
||||||
|
"scratch-vm": "1.5.27",
|
||||||
|
"semantic-release": "21.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
32
release.config.js
Normal file
32
release.config.js
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
module.exports = {
|
||||||
|
branches: [
|
||||||
|
"main",
|
||||||
|
{
|
||||||
|
name: "develop",
|
||||||
|
prerelease: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
plugins: [
|
||||||
|
'@semantic-release/commit-analyzer',
|
||||||
|
'@semantic-release/release-notes-generator',
|
||||||
|
[
|
||||||
|
'@semantic-release/changelog',
|
||||||
|
{
|
||||||
|
changelogTitle: '# Changelog\n\nAll notable changes to this project will be documented in this file. See\n[Conventional Commits](https://conventionalcommits.org) for commit guidelines.'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'@semantic-release/npm',
|
||||||
|
{
|
||||||
|
npmPublish: false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'@semantic-release/git',
|
||||||
|
{
|
||||||
|
// eslint-disable-next-line no-template-curly-in-string
|
||||||
|
message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
};
|
|
@ -24,6 +24,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
||||||
README.md = README.md
|
README.md = README.md
|
||||||
stylecop.json = stylecop.json
|
stylecop.json = stylecop.json
|
||||||
TRADEMARK = TRADEMARK
|
TRADEMARK = TRADEMARK
|
||||||
|
package.json = package.json
|
||||||
|
release.config.js = release.config.js
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "scratch-link-common", "scratch-link-common\scratch-link-common.shproj", "{06B5D2A3-AD0A-4704-B00D-BCFF634E7709}"
|
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "scratch-link-common", "scratch-link-common\scratch-link-common.shproj", "{06B5D2A3-AD0A-4704-B00D-BCFF634E7709}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue