Skip to content

Commit dc284e4

Browse files
committed
adm: bootstrap.fan
Change bootstrap.fan to clone from GitHub instead of BitBucket
1 parent 22291aa commit dc284e4

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ obj/Release/
2424
/src/domkit/res/css/
2525

2626
# lib/
27-
/lib/java/*.jar
27+
/lib/java/**/*.jar
2828
/lib/javascript/
2929
/lib/dotnet/*.pdb
3030
/lib/dotnet/sys.dll

adm/bootstrap.fan

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
using util
1111

1212
**
13-
** Perform a check-out from hg tip and clean bootstrap build
13+
** Perform a check-out from git tip and clean bootstrap build
1414
**
1515
class Bootstrap : AbstractMain
1616
{
@@ -19,16 +19,16 @@ class Bootstrap : AbstractMain
1919
// Env
2020
//////////////////////////////////////////////////////////////////////////
2121

22-
@Opt { help = "Mercurial repository to clone" }
23-
Str hgRepo := "https://bitbucket.org/fantom/fan-1.0"
22+
@Opt { help = "Git repository to clone" }
23+
Str gitRepo := "https://github.com/fantom-lang/fantom"
2424

25-
@Opt { help = "Skip hg pull step" }
25+
@Opt { help = "Skip git pull step" }
2626
Bool skipPull := false
2727

2828
@Opt { help = "Dir to clone repo and build" }
2929
File devHome
3030

31-
Str? hgVer
31+
Str? gitVer
3232
Str? jdkVer
3333
File? jdkHome
3434
Str relVer
@@ -57,7 +57,7 @@ class Bootstrap : AbstractMain
5757
printEnv
5858
checks
5959
confirm
60-
hgPull
60+
gitPull
6161
configEtcs
6262
build
6363
return 0
@@ -71,11 +71,11 @@ class Bootstrap : AbstractMain
7171

7272
Void initEnv()
7373
{
74-
// hgVer
74+
// gitVer
7575
if (skipPull)
76-
hgRepo = hgVer = "*** SKIP ***"
76+
gitRepo = gitVer = "*** SKIP ***"
7777
else
78-
hgVer = execToStr(["hg", "version"])
78+
gitVer = execToStr(["git", "--version"])
7979

8080
// javaHome
8181
javaHome := Env.cur.vars.find |v, k| { k.lower == "java_home" }
@@ -100,9 +100,9 @@ class Bootstrap : AbstractMain
100100
{
101101
echo("")
102102
echo("Bootstrap Environment:")
103-
echo(" hgRepo: $hgRepo")
104-
echo(" hgVer: $hgVer")
105-
echo(" jdkVer: $jdkVer (need 1.6+)")
103+
echo(" gitRepo: $gitRepo")
104+
echo(" gitVer: $gitVer")
105+
echo(" jdkVer: $jdkVer (need 1.8+)")
106106
echo(" jdkHome: $jdkHome")
107107
echo(" relVer: $relVer")
108108
echo(" relHome: $relHome")
@@ -116,8 +116,8 @@ class Bootstrap : AbstractMain
116116

117117
Void checks()
118118
{
119-
if (!hgVer.contains("Mercurial") && !skipPull)
120-
fatal("check that 'hg' is installed in your path")
119+
if (!gitVer.contains("git") && !skipPull)
120+
fatal("check that 'git' is installed in your path")
121121

122122
if (!jdkVer.contains("javac"))
123123
fatal("check that 'javac' is installed in your path")
@@ -145,26 +145,26 @@ class Bootstrap : AbstractMain
145145
}
146146

147147
//////////////////////////////////////////////////////////////////////////
148-
// Hg Pull
148+
// Git Pull
149149
//////////////////////////////////////////////////////////////////////////
150150

151-
Void hgPull()
151+
Void gitPull()
152152
{
153153
if (skipPull) return
154154

155155
// clone or pull+update
156-
if(devHome.plus(`.hg/`).exists)
157-
runPullCmd(["hg", "pull", "-u", hgRepo], devHome)
156+
if(devHome.plus(`.git/`).exists)
157+
runPullCmd(["git", "pull"], devHome)
158158
else
159-
runPullCmd(["hg", "clone", hgRepo, devHome.osPath], devHome.parent)
159+
runPullCmd(["git", "clone", gitRepo, devHome.osPath], devHome.parent)
160160
}
161161

162162
Void runPullCmd(Str[] cmd, File workDir)
163163
{
164164
echo("")
165165
echo(cmd.join(" "))
166166
r := Process(cmd, workDir).run.join
167-
if (r != 0) fatal("could not hg clone/pull repo")
167+
if (r != 0) fatal("could not git clone/pull repo")
168168
}
169169

170170
//////////////////////////////////////////////////////////////////////////
@@ -243,4 +243,4 @@ class Bootstrap : AbstractMain
243243
return r != 0 ? "" : buf.flip.readAllLines.first
244244
}
245245

246-
}
246+
}

0 commit comments

Comments
 (0)