mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-27 04:34:59 +01:00
Merge pull request #66 from sass/link-prs
Allow PRs to be linked to the Dart Sass and embedded protocol repos
This commit is contained in:
commit
d9b98b48bb
40
.github/workflows/ci.yml
vendored
40
.github/workflows/ci.yml
vendored
@ -27,8 +27,28 @@ jobs:
|
|||||||
with: { version: "${{ env.protoc_version }}", repo-token: "${{ github.token }}" }
|
with: { version: "${{ env.protoc_version }}", repo-token: "${{ github.token }}" }
|
||||||
- uses: dart-lang/setup-dart@v1
|
- uses: dart-lang/setup-dart@v1
|
||||||
with: {sdk: "${{ matrix.dart_channel }}"}
|
with: {sdk: "${{ matrix.dart_channel }}"}
|
||||||
|
|
||||||
|
- name: Check out Dart Sass
|
||||||
|
uses: sass/clone-linked-repo@v1
|
||||||
|
with:
|
||||||
|
repo: sass/dart-sass
|
||||||
|
path: build/dart-sass
|
||||||
|
default-ref: null
|
||||||
|
|
||||||
|
- name: Add Dart Sass to pubspec
|
||||||
|
run: >
|
||||||
|
if [[ -d build/dart-sass ]]; then
|
||||||
|
echo "dependency_overrides: {sass: {path: build/dart-sass}}" >> pubspec.yaml
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Check out embedded Sass protocol
|
||||||
|
uses: sass/clone-linked-repo@v1
|
||||||
|
with: {repo: sass/embedded-protocol, path: build/embedded-protocol}
|
||||||
|
|
||||||
- run: dart pub get
|
- run: dart pub get
|
||||||
- run: dart pub run grinder protobuf
|
- run: dart pub run grinder protobuf
|
||||||
|
env: {UPDATE_SASS_PROTOCOL: false}
|
||||||
- run: dart pub run grinder pkg-standalone-dev
|
- run: dart pub run grinder pkg-standalone-dev
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: dart pub run test -r expanded
|
run: dart pub run test -r expanded
|
||||||
@ -42,8 +62,28 @@ jobs:
|
|||||||
- uses: arduino/setup-protoc@v1
|
- uses: arduino/setup-protoc@v1
|
||||||
with: { version: "${{ env.protoc_version }}", repo-token: "${{ github.token }}" }
|
with: { version: "${{ env.protoc_version }}", repo-token: "${{ github.token }}" }
|
||||||
- uses: dart-lang/setup-dart@v1
|
- uses: dart-lang/setup-dart@v1
|
||||||
|
|
||||||
|
- name: Check out Dart Sass
|
||||||
|
uses: sass/clone-linked-repo@v1
|
||||||
|
with:
|
||||||
|
repo: sass/dart-sass
|
||||||
|
path: build/dart-sass
|
||||||
|
default-ref: null
|
||||||
|
|
||||||
|
- name: Add Dart Sass to pubspec
|
||||||
|
run: >
|
||||||
|
if [[ -d build/dart-sass ]]; then
|
||||||
|
echo "dependency_overrides: {sass: {path: build/dart-sass}}" >> pubspec.yaml
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Check out embedded Sass protocol
|
||||||
|
uses: sass/clone-linked-repo@v1
|
||||||
|
with: {repo: sass/embedded-protocol, path: build/embedded-protocol}
|
||||||
|
|
||||||
- run: dart pub get
|
- run: dart pub get
|
||||||
- run: dart pub run grinder protobuf
|
- run: dart pub run grinder protobuf
|
||||||
|
env: {UPDATE_SASS_PROTOCOL: false}
|
||||||
- name: Analyze dart
|
- name: Analyze dart
|
||||||
run: dartanalyzer --fatal-warnings ./
|
run: dartanalyzer --fatal-warnings ./
|
||||||
|
|
||||||
|
@ -315,7 +315,7 @@ packages:
|
|||||||
name: sass
|
name: sass
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.48.0"
|
version: "1.49.0"
|
||||||
sass_analysis:
|
sass_analysis:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
@ -331,7 +331,7 @@ packages:
|
|||||||
name: sass_api
|
name: sass_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0-beta.28"
|
version: "1.0.0-beta.29"
|
||||||
shelf:
|
shelf:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name: sass_embedded
|
name: sass_embedded
|
||||||
version: 1.0.0-beta.16
|
version: 1.0.0-dev
|
||||||
description: An implementation of the Sass embedded protocol using Dart Sass.
|
description: An implementation of the Sass embedded protocol using Dart Sass.
|
||||||
homepage: https://github.com/sass/dart-sass-embedded
|
homepage: https://github.com/sass/dart-sass-embedded
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ dependencies:
|
|||||||
meta: ^1.1.0
|
meta: ^1.1.0
|
||||||
path: ^1.6.0
|
path: ^1.6.0
|
||||||
protobuf: ^2.0.0
|
protobuf: ^2.0.0
|
||||||
sass: ^1.42.0
|
sass: 1.49.0
|
||||||
sass_api: ^1.0.0-beta.5
|
sass_api: ^1.0.0-beta.5
|
||||||
source_span: ^1.1.0
|
source_span: ^1.1.0
|
||||||
stack_trace: ^1.6.0
|
stack_trace: ^1.6.0
|
||||||
|
30
test/dependencies_test.dart
Normal file
30
test/dependencies_test.dart
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
// Copyright 2022 Google LLC. Use of this source code is governed by an
|
||||||
|
// MIT-style license that can be found in the LICENSE file or at
|
||||||
|
// https://opensource.org/licenses/MIT.
|
||||||
|
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:pubspec_parse/pubspec_parse.dart';
|
||||||
|
import 'package:pub_semver/pub_semver.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
|
/// This package's pubspec.
|
||||||
|
var _pubspec = Pubspec.parse(File('pubspec.yaml').readAsStringSync(),
|
||||||
|
sourceUrl: Uri.parse('pubspec.yaml'));
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
// Assert that our declared dependency on Dart Sass is either a Git dependency
|
||||||
|
// or the same version as the version we're testing against.
|
||||||
|
|
||||||
|
test('depends on a compatible version of Dart Sass', () {
|
||||||
|
var sassDependency = _pubspec.dependencies['sass'];
|
||||||
|
if (sassDependency is GitDependency) return;
|
||||||
|
|
||||||
|
var actualVersion =
|
||||||
|
(Process.runSync('dart', ['run', 'sass', '--version']).stdout as String)
|
||||||
|
.trim();
|
||||||
|
expect(sassDependency, isA<HostedDependency>());
|
||||||
|
expect(actualVersion,
|
||||||
|
equals((sassDependency as HostedDependency).version.toString()));
|
||||||
|
});
|
||||||
|
}
|
@ -50,7 +50,10 @@ dart pub run protoc_plugin %*
|
|||||||
run('chmod', arguments: ['a+x', 'build/protoc-gen-dart']);
|
run('chmod', arguments: ['a+x', 'build/protoc-gen-dart']);
|
||||||
}
|
}
|
||||||
|
|
||||||
await cloneOrPull("git://github.com/sass/embedded-protocol");
|
if (Platform.environment['UPDATE_SASS_PROTOCOL'] != 'false') {
|
||||||
|
await cloneOrPull("git://github.com/sass/embedded-protocol");
|
||||||
|
}
|
||||||
|
|
||||||
await runAsync("protoc",
|
await runAsync("protoc",
|
||||||
arguments: [
|
arguments: [
|
||||||
"-Ibuild/embedded-protocol",
|
"-Ibuild/embedded-protocol",
|
||||||
|
Loading…
Reference in New Issue
Block a user