straight_to_video 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/mediabunny.min.js +9 -9
- data/app/assets/javascripts/straight-to-video.js +144 -48
- data/index.js +143 -47
- data/lib/straight_to_video/version.rb +1 -1
- data/package-lock.json +18 -18
- data/package.json +3 -3
- data/script/release +87 -33
- data/script/test +1 -1
- metadata +3 -3
data/script/release
CHANGED
|
@@ -21,49 +21,103 @@ case "$BUMP_TYPE" in
|
|
|
21
21
|
*) echo "Invalid bump type: $BUMP_TYPE (must be patch|minor|major)" >&2; exit 2 ;;
|
|
22
22
|
esac
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
package_name() {
|
|
25
|
+
node -p "require('./package.json').name"
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
package_version() {
|
|
29
|
+
node -p "require('./package.json').version"
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
head_package_version() {
|
|
33
|
+
git show HEAD:package.json | node -p "JSON.parse(require('fs').readFileSync(0, 'utf8')).version"
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
assert_working_tree_is_release_safe() {
|
|
37
|
+
local status
|
|
38
|
+
status="$(git status --porcelain)"
|
|
39
|
+
|
|
40
|
+
[ -z "$status" ] && return 0
|
|
41
|
+
|
|
42
|
+
local disallowed
|
|
43
|
+
disallowed="$(echo "$status" | sed -E 's/^.. //g' | while read -r path; do
|
|
44
|
+
case "$path" in
|
|
45
|
+
CHANGELOG.md|Gemfile.lock|package.json|package-lock.json|lib/straight_to_video/version.rb) ;;
|
|
46
|
+
app/assets/javascripts/*|pkg/*) ;;
|
|
47
|
+
*) echo "$path" ;;
|
|
48
|
+
esac
|
|
49
|
+
done)"
|
|
50
|
+
|
|
51
|
+
if [ -n "$disallowed" ]; then
|
|
52
|
+
echo "Working tree has non-release changes. Commit or stash before releasing." >&2
|
|
53
|
+
git status --short
|
|
54
|
+
exit 1
|
|
55
|
+
fi
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
ensure_npm_auth() {
|
|
59
|
+
npm whoami >/dev/null 2>&1 || {
|
|
60
|
+
echo "Not authenticated with npm. Run: npm login" >&2
|
|
61
|
+
exit 1
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
npm_has_version() {
|
|
66
|
+
local package_name version
|
|
67
|
+
package_name="$(package_name)"
|
|
68
|
+
version="$(package_version)"
|
|
69
|
+
|
|
70
|
+
npm view "${package_name}@${version}" version >/dev/null 2>&1
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
head_is_version_commit() {
|
|
74
|
+
[ "$(git log -1 --pretty=%s)" = "$(package_version)" ]
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
assert_working_tree_is_release_safe
|
|
31
78
|
|
|
32
79
|
## Bump version in package.json only (no git tag)
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
# Sync Ruby gem version file to the new package version
|
|
37
|
-
# Read version from package.json using Node for portability
|
|
38
|
-
VERSION=$(node -p "require('./package.json').version")
|
|
39
|
-
if [ -z "${VERSION:-}" ]; then
|
|
40
|
-
echo "Unable to determine version from package.json" >&2
|
|
41
|
-
exit 1
|
|
80
|
+
if ! (head_is_version_commit && npm_has_version); then
|
|
81
|
+
ensure_npm_auth
|
|
42
82
|
fi
|
|
43
83
|
|
|
44
|
-
|
|
45
|
-
if [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
fi
|
|
84
|
+
if ! head_is_version_commit; then
|
|
85
|
+
if [ "$(package_version)" = "$(head_package_version)" ]; then
|
|
86
|
+
echo "Bumping version: npm version --no-git-tag-version $BUMP_TYPE"
|
|
87
|
+
npm version "$BUMP_TYPE" --no-git-tag-version
|
|
88
|
+
fi
|
|
89
|
+
|
|
90
|
+
VERSION="$(package_version)"
|
|
49
91
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
92
|
+
RB_VERSION_FILE="lib/straight_to_video/version.rb"
|
|
93
|
+
if [ ! -f "$RB_VERSION_FILE" ]; then
|
|
94
|
+
echo "Missing $RB_VERSION_FILE" >&2
|
|
95
|
+
exit 1
|
|
96
|
+
fi
|
|
53
97
|
|
|
54
|
-
|
|
55
|
-
|
|
98
|
+
tmp_file="$RB_VERSION_FILE.tmp"
|
|
99
|
+
printf 'module StraightToVideo\n VERSION = "%s"\nend\n' "$VERSION" > "$tmp_file"
|
|
100
|
+
mv "$tmp_file" "$RB_VERSION_FILE"
|
|
56
101
|
|
|
57
|
-
#
|
|
58
|
-
|
|
102
|
+
# Vendor javascript files (reflect new version in headers)
|
|
103
|
+
./script/vendor
|
|
59
104
|
|
|
60
|
-
#
|
|
61
|
-
|
|
62
|
-
|
|
105
|
+
# Bump the version in the Gemfile.lock
|
|
106
|
+
bundle
|
|
107
|
+
|
|
108
|
+
# Commit version bumps as a single commit; bundler's rake release will tag
|
|
109
|
+
git add CHANGELOG.md package.json package-lock.json Gemfile.lock "$RB_VERSION_FILE" app/assets/javascripts
|
|
110
|
+
git commit -m "$VERSION"
|
|
111
|
+
fi
|
|
63
112
|
|
|
64
113
|
# Publish to npm
|
|
65
|
-
|
|
66
|
-
|
|
114
|
+
VERSION="$(package_version)"
|
|
115
|
+
if npm_has_version; then
|
|
116
|
+
echo "Skipping npm publish (already published): $(package_name)@${VERSION}"
|
|
117
|
+
else
|
|
118
|
+
echo "Publishing to npm (2FA may prompt)..."
|
|
119
|
+
npm publish
|
|
120
|
+
fi
|
|
67
121
|
|
|
68
122
|
# Trigger JSPM build
|
|
69
123
|
echo "Triggering JSPM build for straight-to-video@${VERSION}..."
|
data/script/test
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: straight_to_video
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin Searls
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: railties
|
|
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
77
77
|
- !ruby/object:Gem::Version
|
|
78
78
|
version: '0'
|
|
79
79
|
requirements: []
|
|
80
|
-
rubygems_version: 3.6.
|
|
80
|
+
rubygems_version: 3.6.9
|
|
81
81
|
specification_version: 4
|
|
82
82
|
summary: Browser-based, hardware-accelerated video upload optimization
|
|
83
83
|
test_files: []
|