firefly-compiler 0.4.48 → 0.4.50
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.
- package/bin/Release.ff +44 -25
- package/package.json +1 -1
- package/vscode/package.json +1 -1
package/bin/Release.ff
CHANGED
|
@@ -25,34 +25,51 @@ release(
|
|
|
25
25
|
runSuccessful(system, "node", ["output/js/ff/compiler/Main.mjs", "bootstrap"], system.path(".."))
|
|
26
26
|
runSuccessful(system, "node", ["output/js/ff/compiler/Main.mjs", "bootstrap"], system.path(".."))
|
|
27
27
|
runSuccessful(system, "node", ["output/js/ff/compiler/Main.mjs", "bootstrap"], system.path(".."))
|
|
28
|
-
bumpMinorVersion(system, system.path("../package.json"))
|
|
28
|
+
let version = bumpMinorVersion(system, system.path("../package.json"))
|
|
29
29
|
bumpMinorVersion(system, system.path("../vscode/package.json"))
|
|
30
30
|
runSuccessful(system, "npm", ["publish"], system.path(".."))
|
|
31
31
|
runSuccessful(system, "vsce", ["publish"], system.path("../vscode"))
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
releaseFireflyPackage(system, accessKeyId, secretAccessKey, "compiler")
|
|
33
|
+
releaseFireflyPackage(system, accessKeyId, secretAccessKey, "core")
|
|
34
|
+
releaseFireflyPackage(system, accessKeyId, secretAccessKey, "lux")
|
|
35
|
+
releaseFireflyPackage(system, accessKeyId, secretAccessKey, "postgresql")
|
|
36
|
+
releaseFireflyPackage(system, accessKeyId, secretAccessKey, "rpc")
|
|
37
|
+
releaseFireflyPackage(system, accessKeyId, secretAccessKey, "s3")
|
|
38
|
+
releaseFireflyPackage(system, accessKeyId, secretAccessKey, "unsafejs")
|
|
39
|
+
releaseFireflyPackage(system, accessKeyId, secretAccessKey, "webserver")
|
|
40
|
+
runSuccessful(system, "git", ["commit", "-a", "-m", "Autorelease " + version], system.path(".."))
|
|
41
|
+
runSuccessful(system, "git", ["push"], system.path(".."))
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
releaseFireflyPackage(
|
|
45
|
+
system: NodeSystem
|
|
46
|
+
accessKeyId: String
|
|
47
|
+
secretAccessKey: String
|
|
48
|
+
packageName: String
|
|
49
|
+
): Unit {
|
|
50
|
+
system.writeLine("")
|
|
51
|
+
system.writeLine("Will release package: " + packageName)
|
|
52
|
+
let temporary = system.path("../" + packageName + "/.firefly/temporary")
|
|
53
|
+
if(!temporary.exists()) {temporary.createDirectory()}
|
|
54
|
+
let tarGz = temporary.slash("ff_" + packageName + "_0_0_0.tar.gz")
|
|
55
|
+
if(tarGz.exists()) {
|
|
56
|
+
tarGz.delete()
|
|
57
|
+
system.writeLine("Deleted " + tarGz.absolute())
|
|
38
58
|
}
|
|
39
|
-
internalMakeTarGz(
|
|
40
|
-
system.writeLine("Created " +
|
|
59
|
+
internalMakeTarGz(tarGz, system.path("../" + packageName))
|
|
60
|
+
system.writeLine("Created " + tarGz.absolute())
|
|
41
61
|
S3.put(
|
|
42
62
|
system
|
|
43
63
|
accessKeyId
|
|
44
64
|
secretAccessKey
|
|
45
65
|
"eu-central-1"
|
|
46
66
|
"firefly-site"
|
|
47
|
-
"site/packages/ff/
|
|
48
|
-
|
|
67
|
+
"site/packages/ff/" + packageName + "/" + tarGz.base()
|
|
68
|
+
tarGz.readBuffer()
|
|
49
69
|
headers = [
|
|
50
70
|
Pair("Content-Type", "application/x-gzip")
|
|
51
71
|
]
|
|
52
72
|
)
|
|
53
|
-
|
|
54
|
-
// git commit
|
|
55
|
-
// git push
|
|
56
73
|
}
|
|
57
74
|
|
|
58
75
|
requireNpmLoggedIn(system: NodeSystem, workingDirectory: Path) {
|
|
@@ -80,24 +97,23 @@ requireVsceLoggedIn(system: NodeSystem, workingDirectory: Path) {
|
|
|
80
97
|
run(system: NodeSystem, command: String, arguments: List[String], workingDirectory: Path): ProcessResult {
|
|
81
98
|
system.writeLine("")
|
|
82
99
|
system.writeLine(command + " " + arguments.join(" "))
|
|
83
|
-
|
|
84
|
-
system.writeBuffer(out.standardOut)
|
|
85
|
-
system.writeErrorBuffer(out.standardError)
|
|
86
|
-
out
|
|
100
|
+
system.execute(command, arguments, workingDirectory = Some(workingDirectory))
|
|
87
101
|
}
|
|
88
102
|
|
|
89
103
|
runSuccessful(system: NodeSystem, command: String, arguments: List[String], workingDirectory: Path): Buffer {
|
|
90
104
|
let out = run(system, command, arguments, workingDirectory)
|
|
91
105
|
if(out.exitCode != 0) {
|
|
106
|
+
system.writeBuffer(out.standardOut)
|
|
107
|
+
system.writeErrorBuffer(out.standardError)
|
|
92
108
|
system.writeErrorLine("Exit code: " + out.exitCode)
|
|
93
109
|
system.exit(1)
|
|
94
110
|
}
|
|
95
111
|
out.standardOut
|
|
96
112
|
}
|
|
97
113
|
|
|
98
|
-
bumpMinorVersion(system: NodeSystem, packageJsonPath: Path) {
|
|
114
|
+
bumpMinorVersion(system: NodeSystem, packageJsonPath: Path): String {
|
|
99
115
|
let prefix = " \"version\": \""
|
|
100
|
-
mutable
|
|
116
|
+
mutable newVersions = []
|
|
101
117
|
system.writeLine("")
|
|
102
118
|
system.writeLine("Bumping version in " + packageJsonPath.absolute())
|
|
103
119
|
let newContent = packageJsonPath.readText().lines().map {
|
|
@@ -108,18 +124,21 @@ bumpMinorVersion(system: NodeSystem, packageJsonPath: Path) {
|
|
|
108
124
|
} {
|
|
109
125
|
patch.getInt() | Some(p)
|
|
110
126
|
} =>
|
|
111
|
-
bumps += 1
|
|
112
127
|
let newVersion = major + "." + minor + "." + (p + 1)
|
|
128
|
+
newVersions = [...newVersions, newVersion]
|
|
113
129
|
system.writeLine("Will bump version: " + v + " to " + newVersion)
|
|
114
130
|
prefix + newVersion + "\","
|
|
115
131
|
| line =>
|
|
116
132
|
line
|
|
117
133
|
}.join("\n")
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
134
|
+
newVersions.{
|
|
135
|
+
| [newVersion] =>
|
|
136
|
+
packageJsonPath.writeText(newContent)
|
|
137
|
+
newVersion
|
|
138
|
+
| _ =>
|
|
139
|
+
system.writeErrorLine("Failed to bump version.")
|
|
140
|
+
system.exit(1)
|
|
121
141
|
}
|
|
122
|
-
packageJsonPath.writeText(newContent)
|
|
123
142
|
}
|
|
124
143
|
|
|
125
144
|
internalMakeTarGz(tarGzPath: Path, path: Path): Unit
|
package/package.json
CHANGED