fix generation of infor files
Now have files relative to the top of the repo.
This commit is contained in:
parent
77e490108b
commit
c7cbd6488c
1 changed files with 6 additions and 6 deletions
|
@ -103,14 +103,14 @@ makeinfos updated = do
|
||||||
now <- liftIO getCurrentTime
|
now <- liftIO getCurrentTime
|
||||||
liftIO $ putStrLn $ "building info files in " ++ basedir
|
liftIO $ putStrLn $ "building info files in " ++ basedir
|
||||||
forM_ updated $ \(f, bv) -> do
|
forM_ updated $ \(f, bv) -> do
|
||||||
v <- lookupFile f
|
v <- lookupFile (basedir </> f)
|
||||||
case v of
|
case v of
|
||||||
Nothing -> noop
|
Nothing -> noop
|
||||||
Just k -> whenM (inAnnex k) $ do
|
Just k -> whenM (inAnnex k) $ do
|
||||||
liftIO $ putStrLn f
|
liftIO $ putStrLn f
|
||||||
let infofile = f ++ ".info"
|
let infofile = basedir </> f ++ ".info"
|
||||||
liftIO $ writeFile infofile $ show $ GitAnnexDistribution
|
liftIO $ writeFile infofile $ show $ GitAnnexDistribution
|
||||||
{ distributionUrl = mkUrl basedir f
|
{ distributionUrl = mkUrl f
|
||||||
, distributionKey = k
|
, distributionKey = k
|
||||||
, distributionVersion = bv
|
, distributionVersion = bv
|
||||||
, distributionReleasedate = now
|
, distributionReleasedate = now
|
||||||
|
@ -118,7 +118,7 @@ makeinfos updated = do
|
||||||
}
|
}
|
||||||
void $ inRepo $ runBool [Param "add", File infofile]
|
void $ inRepo $ runBool [Param "add", File infofile]
|
||||||
signFile infofile
|
signFile infofile
|
||||||
signFile f
|
signFile (basedir </> f)
|
||||||
void $ inRepo $ runBool
|
void $ inRepo $ runBool
|
||||||
[ Param "commit"
|
[ Param "commit"
|
||||||
, Param "-m"
|
, Param "-m"
|
||||||
|
@ -151,8 +151,8 @@ getRepoDir = do
|
||||||
home <- liftIO myHomeDir
|
home <- liftIO myHomeDir
|
||||||
return $ home </> "lib" </> "downloads"
|
return $ home </> "lib" </> "downloads"
|
||||||
|
|
||||||
mkUrl :: FilePath -> FilePath -> String
|
mkUrl :: FilePath -> String
|
||||||
mkUrl basedir f = "https://downloads.kitenet.net/" ++ relPathDirToFile basedir f
|
mkUrl f = "https://downloads.kitenet.net/" ++ f
|
||||||
|
|
||||||
signFile :: FilePath -> Annex ()
|
signFile :: FilePath -> Annex ()
|
||||||
signFile f = do
|
signFile f = do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue